{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": [],
      "gpuType": "T4",
      "authorship_tag": "ABX9TyNwSLBuqR0K03T4lSRVa+jh",
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    },
    "accelerator": "GPU",
    "widgets": {
      "application/vnd.jupyter.widget-state+json": {
        "93721b72963843db8afd2dc95b1a7e26": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "VBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "VBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "VBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_1b54ffd23ba74eeebd9c469f440fb681",
              "IPY_MODEL_6b08ab9f42604d50b75ca79953cdb513",
              "IPY_MODEL_da126394b0454dfa92ead879aa4d05f8",
              "IPY_MODEL_cdad03b3eb6f4b8498d4c095ef4bd77c"
            ],
            "layout": "IPY_MODEL_229eb3fe560b47cfaf90bd897d0356a3"
          }
        },
        "3c4c437c3be348a6beaa549a070e7d03": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_2488b59a84c4450a87d03d1a7416131a",
            "placeholder": "​",
            "style": "IPY_MODEL_aba01680bd644852bdd01943fe6ff3a8",
            "value": "<center> <img\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.svg\nalt='Hugging Face'> <br> Copy a token from <a\nhref=\"https://huggingface.co/settings/tokens\" target=\"_blank\">your Hugging Face\ntokens page</a> and paste it below. <br> Immediately click login after copying\nyour token or it might be stored in plain text in this notebook file. </center>"
          }
        },
        "bef331d1317e4dca8423b41d9a4d5a46": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "PasswordModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "PasswordModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "PasswordView",
            "continuous_update": true,
            "description": "Token:",
            "description_tooltip": null,
            "disabled": false,
            "layout": "IPY_MODEL_32368ce026824d4faad5f96bb523b1ef",
            "placeholder": "​",
            "style": "IPY_MODEL_6c9bfecb5c7d4218b905c5d9d1a94e67",
            "value": ""
          }
        },
        "fd8eb83e711f4efeb5392159094979ee": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "CheckboxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "CheckboxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "CheckboxView",
            "description": "Add token as git credential?",
            "description_tooltip": null,
            "disabled": false,
            "indent": true,
            "layout": "IPY_MODEL_cdcf8ddbe33d443ebb8e746da30ac0e7",
            "style": "IPY_MODEL_0394a80f33694ddcaac86d11eb55dfba",
            "value": true
          }
        },
        "361f03f842874570ba0f5a7992ef85bb": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ButtonModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ButtonModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ButtonView",
            "button_style": "",
            "description": "Login",
            "disabled": false,
            "icon": "",
            "layout": "IPY_MODEL_2087238355ef44719f296fa797fdd1a4",
            "style": "IPY_MODEL_3a25c5df13944295882f0114971dad95",
            "tooltip": ""
          }
        },
        "da5b0da670514701962d1fb278d2c806": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_9c9e13827ccd49c28eb7e4b5b7bce367",
            "placeholder": "​",
            "style": "IPY_MODEL_d65e536585574e1ebbe7dc596e5fff5b",
            "value": "\n<b>Pro Tip:</b> If you don't already have one, you can create a dedicated\n'notebooks' token with 'write' access, that you can then easily reuse for all\nnotebooks. </center>"
          }
        },
        "229eb3fe560b47cfaf90bd897d0356a3": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": "center",
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": "flex",
            "flex": null,
            "flex_flow": "column",
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": "50%"
          }
        },
        "2488b59a84c4450a87d03d1a7416131a": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "aba01680bd644852bdd01943fe6ff3a8": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "32368ce026824d4faad5f96bb523b1ef": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "6c9bfecb5c7d4218b905c5d9d1a94e67": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "cdcf8ddbe33d443ebb8e746da30ac0e7": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "0394a80f33694ddcaac86d11eb55dfba": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "2087238355ef44719f296fa797fdd1a4": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "3a25c5df13944295882f0114971dad95": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ButtonStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ButtonStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "button_color": null,
            "font_weight": ""
          }
        },
        "9c9e13827ccd49c28eb7e4b5b7bce367": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "d65e536585574e1ebbe7dc596e5fff5b": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "1878c66b2eae453a864ffead4070b1b1": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "LabelModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "LabelModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "LabelView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_07a86a9d6045490582005ae3dc6235b4",
            "placeholder": "​",
            "style": "IPY_MODEL_26203a05198d4ceeacbf5e773709f351",
            "value": "Connecting..."
          }
        },
        "07a86a9d6045490582005ae3dc6235b4": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "26203a05198d4ceeacbf5e773709f351": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "1b54ffd23ba74eeebd9c469f440fb681": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "LabelModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "LabelModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "LabelView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_3ea83882b0c24fc6bdc55ec477e8d966",
            "placeholder": "​",
            "style": "IPY_MODEL_9cee18be45e147d094a9f3d563e43deb",
            "value": "Token is valid (permission: write)."
          }
        },
        "6b08ab9f42604d50b75ca79953cdb513": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "LabelModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "LabelModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "LabelView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_c7a697bfe78e4ef3ba7c086c6a7dc9a0",
            "placeholder": "​",
            "style": "IPY_MODEL_3e3a59c9cd1e4bab9a7134b3ed460a70",
            "value": "Your token has been saved in your configured git credential helpers (store)."
          }
        },
        "da126394b0454dfa92ead879aa4d05f8": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "LabelModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "LabelModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "LabelView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_13f4a118e7ef4a148bde03a6e84e8aa3",
            "placeholder": "​",
            "style": "IPY_MODEL_da203394bbcb4a3a98ccf00c99c8397c",
            "value": "Your token has been saved to /root/.cache/huggingface/token"
          }
        },
        "cdad03b3eb6f4b8498d4c095ef4bd77c": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "LabelModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "LabelModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "LabelView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_e72159dd38c04fda9b6944b21ef7ee18",
            "placeholder": "​",
            "style": "IPY_MODEL_3be1673dc1ce401f9bf74665671fe25e",
            "value": "Login successful"
          }
        },
        "3ea83882b0c24fc6bdc55ec477e8d966": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "9cee18be45e147d094a9f3d563e43deb": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "c7a697bfe78e4ef3ba7c086c6a7dc9a0": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "3e3a59c9cd1e4bab9a7134b3ed460a70": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "13f4a118e7ef4a148bde03a6e84e8aa3": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "da203394bbcb4a3a98ccf00c99c8397c": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "e72159dd38c04fda9b6944b21ef7ee18": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "3be1673dc1ce401f9bf74665671fe25e": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "fcb820b4909e413e98603c195818e0d4": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_6b0a6739adbe41e8a5c34f8a8868b977",
              "IPY_MODEL_0b9514defba84991b4f36485b7e630fb",
              "IPY_MODEL_6a7973751e4d4ca08ef4c53c97103868"
            ],
            "layout": "IPY_MODEL_0deb9610aaff49c488b6e89139fe31df"
          }
        },
        "6b0a6739adbe41e8a5c34f8a8868b977": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_89f149a2080f4721a483ff535b6e6602",
            "placeholder": "​",
            "style": "IPY_MODEL_4f62c475347944d6b18ce79d125386fc",
            "value": "Loading checkpoint shards: 100%"
          }
        },
        "0b9514defba84991b4f36485b7e630fb": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_996db8f083904106913a3e4b4d6627c9",
            "max": 11,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_f6b2ea40822a41899aae6768c5a34c73",
            "value": 11
          }
        },
        "6a7973751e4d4ca08ef4c53c97103868": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_4523834103534e2b9fb804bdb5265a1e",
            "placeholder": "​",
            "style": "IPY_MODEL_3912010e0694457f9f777c1bbb996967",
            "value": " 11/11 [01:22&lt;00:00,  5.56s/it]"
          }
        },
        "0deb9610aaff49c488b6e89139fe31df": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "89f149a2080f4721a483ff535b6e6602": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "4f62c475347944d6b18ce79d125386fc": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "996db8f083904106913a3e4b4d6627c9": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "f6b2ea40822a41899aae6768c5a34c73": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "4523834103534e2b9fb804bdb5265a1e": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "3912010e0694457f9f777c1bbb996967": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        }
      }
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/ashishpatel26/LLM-Finetuning/blob/main/14.Finetuning_Mistral_7b_Using_AutoTrain.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "## Fine-tuning Mistral 7b with AutoTrain"
      ],
      "metadata": {
        "id": "7oRhTab-3Isg"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "Setup Runtime\n",
        "For fine-tuning Llama, a GPU instance is essential. Follow the directions below:\n",
        "\n",
        "- Go to `Runtime` (located in the top menu bar).\n",
        "- Select `Change Runtime Type`.\n",
        "- Choose `T4 GPU` (or a comparable option)."
      ],
      "metadata": {
        "id": "yhDioAdc3ML5"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "### Step 1: Setup Environment"
      ],
      "metadata": {
        "id": "IJZt3QI73kWF"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "!pip install pandas autotrain-advanced -q"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "UgvqeBz_3XvO",
        "outputId": "96376e39-7fe6-4d68-fe4b-eb5d8f3a3f8f"
      },
      "execution_count": 1,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m129.5/129.5 kB\u001b[0m \u001b[31m3.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m174.1/174.1 kB\u001b[0m \u001b[31m6.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m519.6/519.6 kB\u001b[0m \u001b[31m8.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m72.9/72.9 kB\u001b[0m \u001b[31m8.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m13.4/13.4 MB\u001b[0m \u001b[31m46.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m302.0/302.0 kB\u001b[0m \u001b[31m31.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m60.0/60.0 kB\u001b[0m \u001b[31m8.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m404.2/404.2 kB\u001b[0m \u001b[31m43.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.4/3.4 MB\u001b[0m \u001b[31m80.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m304.5/304.5 kB\u001b[0m \u001b[31m23.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.1/3.1 MB\u001b[0m \u001b[31m17.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m880.6/880.6 kB\u001b[0m \u001b[31m35.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m10.8/10.8 MB\u001b[0m \u001b[31m78.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[31m68.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m77.1/77.1 kB\u001b[0m \u001b[31m9.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m242.5/242.5 kB\u001b[0m \u001b[31m25.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m295.0/295.0 kB\u001b[0m \u001b[31m32.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m20.1/20.1 MB\u001b[0m \u001b[31m85.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m42.2/42.2 kB\u001b[0m \u001b[31m4.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.6/1.6 MB\u001b[0m \u001b[31m90.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m85.6/85.6 kB\u001b[0m \u001b[31m10.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m118.0/118.0 kB\u001b[0m \u001b[31m13.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.0/2.0 MB\u001b[0m \u001b[31m93.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.6/7.6 MB\u001b[0m \u001b[31m122.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m258.1/258.1 kB\u001b[0m \u001b[31m28.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.5/1.5 MB\u001b[0m \u001b[31m70.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m92.6/92.6 MB\u001b[0m \u001b[31m8.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m66.4/66.4 kB\u001b[0m \u001b[31m6.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m53.1/53.1 kB\u001b[0m \u001b[31m5.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m115.3/115.3 kB\u001b[0m \u001b[31m12.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m194.1/194.1 kB\u001b[0m \u001b[31m20.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m15.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m66.3/66.3 kB\u001b[0m \u001b[31m8.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m298.2/298.2 kB\u001b[0m \u001b[31m34.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.7/75.7 kB\u001b[0m \u001b[31m8.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m138.7/138.7 kB\u001b[0m \u001b[31m11.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m45.7/45.7 kB\u001b[0m \u001b[31m4.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m59.5/59.5 kB\u001b[0m \u001b[31m6.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m129.9/129.9 kB\u001b[0m \u001b[31m9.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.2/2.2 MB\u001b[0m \u001b[31m56.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m226.0/226.0 kB\u001b[0m \u001b[31m22.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[31m66.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.8/7.8 MB\u001b[0m \u001b[31m118.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m78.7/78.7 kB\u001b[0m \u001b[31m9.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m7.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.0/67.0 kB\u001b[0m \u001b[31m7.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m76.0/76.0 kB\u001b[0m \u001b[31m8.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25h  Building wheel for ipadic (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
            "  Building wheel for sacremoses (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
            "  Building wheel for ffmpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
            "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
            "tensorflow-metadata 1.14.0 requires protobuf<4.21,>=3.20.3, but you have protobuf 4.23.4 which is incompatible.\u001b[0m\u001b[31m\n",
            "\u001b[0m"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 2,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "kwStofw4257S",
        "outputId": "3c3881f0-9bd5-442f-dd3a-b363cc8d3c88"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "> \u001b[1mINFO    Installing latest transformers@main\u001b[0m\n",
            "> \u001b[1mINFO    Successfully installed latest transformers\u001b[0m\n",
            "> \u001b[1mINFO    Installing latest peft@main\u001b[0m\n",
            "> \u001b[1mINFO    Successfully installed latest peft\u001b[0m\n",
            "> \u001b[1mINFO    Installing latest diffusers@main\u001b[0m\n",
            "> \u001b[1mINFO    Successfully installed latest diffusers\u001b[0m\n",
            "> \u001b[1mINFO    Installing latest trl@main\u001b[0m\n",
            "> \u001b[1mINFO    Successfully installed latest trl\u001b[0m\n",
            "> \u001b[1mINFO    Installing latest xformers\u001b[0m\n",
            "> \u001b[1mINFO    Successfully installed latest xformers\u001b[0m\n",
            "> \u001b[1mINFO    Installing latest PyTorch\u001b[0m\n",
            "> \u001b[1mINFO    Successfully installed latest PyTorch\u001b[0m\n"
          ]
        }
      ],
      "source": [
        "!autotrain setup --update-torch"
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "## Step 2: Connect to HuggingFace for Model Upload\n",
        "\n",
        "### Logging to Hugging Face\n",
        "To make sure the model can be uploaded to be used for Inference, it's necessary to log in to the Hugging Face hub.\n",
        "\n",
        "### Getting a Hugging Face token\n",
        "Steps:\n",
        "\n",
        "1. Navigate to this URL: https://huggingface.co/settings/tokens\n",
        "2. Create a write `token` and copy it to your clipboard\n",
        "3. Run the code below and enter your `token`"
      ],
      "metadata": {
        "id": "H-zXccJMZEx2"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from huggingface_hub import notebook_login\n",
        "notebook_login()"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 145,
          "referenced_widgets": [
            "93721b72963843db8afd2dc95b1a7e26",
            "3c4c437c3be348a6beaa549a070e7d03",
            "bef331d1317e4dca8423b41d9a4d5a46",
            "fd8eb83e711f4efeb5392159094979ee",
            "361f03f842874570ba0f5a7992ef85bb",
            "da5b0da670514701962d1fb278d2c806",
            "229eb3fe560b47cfaf90bd897d0356a3",
            "2488b59a84c4450a87d03d1a7416131a",
            "aba01680bd644852bdd01943fe6ff3a8",
            "32368ce026824d4faad5f96bb523b1ef",
            "6c9bfecb5c7d4218b905c5d9d1a94e67",
            "cdcf8ddbe33d443ebb8e746da30ac0e7",
            "0394a80f33694ddcaac86d11eb55dfba",
            "2087238355ef44719f296fa797fdd1a4",
            "3a25c5df13944295882f0114971dad95",
            "9c9e13827ccd49c28eb7e4b5b7bce367",
            "d65e536585574e1ebbe7dc596e5fff5b",
            "1878c66b2eae453a864ffead4070b1b1",
            "07a86a9d6045490582005ae3dc6235b4",
            "26203a05198d4ceeacbf5e773709f351",
            "1b54ffd23ba74eeebd9c469f440fb681",
            "6b08ab9f42604d50b75ca79953cdb513",
            "da126394b0454dfa92ead879aa4d05f8",
            "cdad03b3eb6f4b8498d4c095ef4bd77c",
            "3ea83882b0c24fc6bdc55ec477e8d966",
            "9cee18be45e147d094a9f3d563e43deb",
            "c7a697bfe78e4ef3ba7c086c6a7dc9a0",
            "3e3a59c9cd1e4bab9a7134b3ed460a70",
            "13f4a118e7ef4a148bde03a6e84e8aa3",
            "da203394bbcb4a3a98ccf00c99c8397c",
            "e72159dd38c04fda9b6944b21ef7ee18",
            "3be1673dc1ce401f9bf74665671fe25e"
          ]
        },
        "id": "VzMLmLP86Ub-",
        "outputId": "dad1be39-2a4b-4979-d08c-6254bb496948"
      },
      "execution_count": 4,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "VBox(children=(HTML(value='<center> <img\\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.sv…"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "93721b72963843db8afd2dc95b1a7e26"
            }
          },
          "metadata": {}
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "## Step 3: Upload your dataset\n",
        "\n",
        "Add your data set to the root directory in the Colab under the name train.csv. The AutoTrain command will look for your data there under that name.\n",
        "\n",
        "#### Don't have a data set and want to try finetuning on an example data set?\n",
        "If you don't have a dataset you can run these commands below to get an example data set and save it to train.csv"
      ],
      "metadata": {
        "id": "qY932JBNZmtA"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "!git clone https://github.com/joshbickett/finetune-llama-2.git\n",
        "%cd finetune-llama-2\n",
        "%mv train.csv ../train.csv\n",
        "%cd .."
      ],
      "metadata": {
        "id": "JxTn4r_YZdkY"
      },
      "execution_count": 5,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "import pandas as pd\n",
        "df = pd.read_csv(\"train.csv\")\n",
        "df"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1849
        },
        "id": "NUb-rkeoZzZ6",
        "outputId": "9dad4111-a670-4801-ba9c-07da36e93884"
      },
      "execution_count": 6,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                           Concept  \\\n",
              "0       A person walks in the rain   \n",
              "1            A cat chasing a mouse   \n",
              "2              A dog eating a bone   \n",
              "3         A bird flying in the sky   \n",
              "4        A fish swimming in a tank   \n",
              "5        A child playing with toys   \n",
              "6        A car driving on the road   \n",
              "7    A flower blooming in a garden   \n",
              "8          A bee collecting pollen   \n",
              "9     A sun setting over the ocean   \n",
              "10        A cow grazing in a field   \n",
              "11       A snail racing on a track   \n",
              "12        A penguin sliding on ice   \n",
              "13    A lion roaring in the jungle   \n",
              "14     A monkey swinging on a tree   \n",
              "15   A turtle sunbathing on a rock   \n",
              "16    A rabbit hopping in a meadow   \n",
              "17      A squirrel collecting nuts   \n",
              "18      A wolf howling at the moon   \n",
              "19     A fox sneaking in the woods   \n",
              "20       A bear fishing in a river   \n",
              "21       A hippo bathing in a pond   \n",
              "22    A giraffe eating from a tree   \n",
              "23      An elephant spraying water   \n",
              "24  A kangaroo jumping in a desert   \n",
              "\n",
              "                             Funny Description Prompt  \\\n",
              "0   A person walks in the rain, wearing a suit mad...   \n",
              "1   A cat, wearing detective attire and sunglasses...   \n",
              "2   A dog with a chef's hat is eating a bone seaso...   \n",
              "3   A bird with oversized sunglasses and a basebal...   \n",
              "4   A fish in a snorkel and flippers swimming in a...   \n",
              "5   A child in a superhero cape playing with alien...   \n",
              "6   A car with legs instead of wheels running down...   \n",
              "7   A flower wearing a top hat and bow tie bloomin...   \n",
              "8   A bee with a backpack vacuum cleaner collectin...   \n",
              "9   The sun wearing sunglasses and sipping on a tr...   \n",
              "10  A cow with headphones on, jamming to music whi...   \n",
              "11  A snail with a racing helmet and number '1' pa...   \n",
              "12  A penguin in ice skates, doing figure skating ...   \n",
              "13  A lion with a microphone, singing a ballad in ...   \n",
              "14  A monkey in a trapeze artist outfit, swinging ...   \n",
              "15  A turtle with sunglasses on, sunbathing on a r...   \n",
              "16  A rabbit in basketball attire, hopping around ...   \n",
              "17  A squirrel in a miner's helmet, using a drill ...   \n",
              "18  A wolf in pajamas, howling at the moon, with a...   \n",
              "19  A fox in ninja attire, sneaking around the woo...   \n",
              "20  A bear with a fishing rod and a fisherman's ha...   \n",
              "21  A hippo with a shower cap on, using a giant ru...   \n",
              "22  A giraffe with a long scarf, eating from a tre...   \n",
              "23  An elephant with a water gun, having a water f...   \n",
              "24  A kangaroo with spring shoes, jumping around i...   \n",
              "\n",
              "                                                 text  \n",
              "0   ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "1   ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "2   ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "3   ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "4   ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "5   ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "6   ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "7   ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "8   ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "9   ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "10  ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "11  ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "12  ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "13  ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "14  ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "15  ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "16  ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "17  ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "18  ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "19  ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "20  ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "21  ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "22  ###Human:\\ngenerate a midjourney prompt for A ...  \n",
              "23  ###Human:\\ngenerate a midjourney prompt for An...  \n",
              "24  ###Human:\\ngenerate a midjourney prompt for A ...  "
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-10103957-7c94-44ed-adb0-80fbb9e799e9\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Concept</th>\n",
              "      <th>Funny Description Prompt</th>\n",
              "      <th>text</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>A person walks in the rain</td>\n",
              "      <td>A person walks in the rain, wearing a suit mad...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>A cat chasing a mouse</td>\n",
              "      <td>A cat, wearing detective attire and sunglasses...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>A dog eating a bone</td>\n",
              "      <td>A dog with a chef's hat is eating a bone seaso...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>A bird flying in the sky</td>\n",
              "      <td>A bird with oversized sunglasses and a basebal...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>A fish swimming in a tank</td>\n",
              "      <td>A fish in a snorkel and flippers swimming in a...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>A child playing with toys</td>\n",
              "      <td>A child in a superhero cape playing with alien...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>A car driving on the road</td>\n",
              "      <td>A car with legs instead of wheels running down...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>A flower blooming in a garden</td>\n",
              "      <td>A flower wearing a top hat and bow tie bloomin...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>A bee collecting pollen</td>\n",
              "      <td>A bee with a backpack vacuum cleaner collectin...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>A sun setting over the ocean</td>\n",
              "      <td>The sun wearing sunglasses and sipping on a tr...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>10</th>\n",
              "      <td>A cow grazing in a field</td>\n",
              "      <td>A cow with headphones on, jamming to music whi...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>11</th>\n",
              "      <td>A snail racing on a track</td>\n",
              "      <td>A snail with a racing helmet and number '1' pa...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>12</th>\n",
              "      <td>A penguin sliding on ice</td>\n",
              "      <td>A penguin in ice skates, doing figure skating ...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>13</th>\n",
              "      <td>A lion roaring in the jungle</td>\n",
              "      <td>A lion with a microphone, singing a ballad in ...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>14</th>\n",
              "      <td>A monkey swinging on a tree</td>\n",
              "      <td>A monkey in a trapeze artist outfit, swinging ...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>15</th>\n",
              "      <td>A turtle sunbathing on a rock</td>\n",
              "      <td>A turtle with sunglasses on, sunbathing on a r...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>16</th>\n",
              "      <td>A rabbit hopping in a meadow</td>\n",
              "      <td>A rabbit in basketball attire, hopping around ...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>17</th>\n",
              "      <td>A squirrel collecting nuts</td>\n",
              "      <td>A squirrel in a miner's helmet, using a drill ...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>18</th>\n",
              "      <td>A wolf howling at the moon</td>\n",
              "      <td>A wolf in pajamas, howling at the moon, with a...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>19</th>\n",
              "      <td>A fox sneaking in the woods</td>\n",
              "      <td>A fox in ninja attire, sneaking around the woo...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>20</th>\n",
              "      <td>A bear fishing in a river</td>\n",
              "      <td>A bear with a fishing rod and a fisherman's ha...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>21</th>\n",
              "      <td>A hippo bathing in a pond</td>\n",
              "      <td>A hippo with a shower cap on, using a giant ru...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>22</th>\n",
              "      <td>A giraffe eating from a tree</td>\n",
              "      <td>A giraffe with a long scarf, eating from a tre...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>23</th>\n",
              "      <td>An elephant spraying water</td>\n",
              "      <td>An elephant with a water gun, having a water f...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for An...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>24</th>\n",
              "      <td>A kangaroo jumping in a desert</td>\n",
              "      <td>A kangaroo with spring shoes, jumping around i...</td>\n",
              "      <td>###Human:\\ngenerate a midjourney prompt for A ...</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-10103957-7c94-44ed-adb0-80fbb9e799e9')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-10103957-7c94-44ed-adb0-80fbb9e799e9 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-10103957-7c94-44ed-adb0-80fbb9e799e9');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-24b1b524-f6d0-40f7-b38a-584fc18ab9d2\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-24b1b524-f6d0-40f7-b38a-584fc18ab9d2')\"\n",
              "            title=\"Suggest charts.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-24b1b524-f6d0-40f7-b38a-584fc18ab9d2 button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "    </div>\n",
              "  </div>\n"
            ]
          },
          "metadata": {},
          "execution_count": 6
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<google.colab._quickchart_helpers.SectionTitle at 0x7cdbda5c8eb0>"
            ],
            "text/html": [
              "<h4 class=\"colab-quickchart-section-title\">Values</h4>\n",
              "<style>\n",
              "  .colab-quickchart-section-title {\n",
              "      clear: both;\n",
              "  }\n",
              "</style>"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "import numpy as np\n",
              "from google.colab import autoviz\n",
              "\n",
              "def value_plot(df, y, figscale=1):\n",
              "  from matplotlib import pyplot as plt\n",
              "  df[y].plot(kind='line', figsize=(8 * figscale, 4 * figscale), title=y)\n",
              "  plt.gca().spines[['top', 'right']].set_visible(False)\n",
              "  plt.tight_layout()\n",
              "  return autoviz.MplChart.from_current_mpl_state()\n",
              "\n",
              "chart = value_plot(_df_0, *['index'], **{})\n",
              "chart"
            ],
            "text/html": [
              "      <div class=\"colab-quickchart-chart-with-code\" id=\"chart-6cf3702c-e000-45ee-83ec-c821e51a89b6\">\n",
              "        <img src=\"\n",
              "bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9h\n",
              "AAAPYQGoP6dpAAAhbElEQVR4nO3de1BU9/k/8PeyC4vclTvsHpGimBgEUVaaGI1NrfUWrXhhaaJ0\n",
              "ktH+kUlnkpk0TuNEmxlN2sQMTaaN087kOi4aMY2JaWqsVZPvz7KrYvBSjQT17HIVkItclr18fn+s\n",
              "WUtEcXXhAPt+zTiTfXb3sw+fHH3z7IE9KiGEABER0W0EKd0AERENfwwLIiIaEMOCiIgGxLAgIqIB\n",
              "MSyIiGhADAsiIhoQw4KIiAbEsCAiogExLIiIaEAMCwpYCxYswMsvv3zXz581axY2bdrkv4aIhjGN\n",
              "0g0QKeUf//iH0i0QjRicLIiIaEAMCwpYjzzyCF588UUAgEqlwptvvomHHnoIERERyMrKwtdff+19\n",
              "rNPpxPPPP4+kpCTEx8djw4YNN61XU1ODoqIipKamIiEhAUajEVeuXAEAHDp0COHh4bBYLAAAIQQW\n",
              "LVqEJUuWgJ/lSSMBw4Lour/97W9477330NraikcffRS//OUvvff94Q9/wK5du3Dw4EHYbDZoNBqU\n",
              "l5d777fb7Xj00UeRkpKCb7/9FtXV1dBoNCgqKgLgCaZNmzZhxYoVaG5uxssvv4xz587hgw8+gEql\n",
              "GvKvlchngihAzZkzR/zud78TQggBQLz33nve+06fPi0AiPr6eiGEEBkZGeJPf/qT936n0yni4+PF\n",
              "Sy+9JIQQoqysTKSkpAi32+19jM1mEwCE1Wr11goKCkR2drYIDw8XFRUVg/jVEfkXT3ATXZeSkuL9\n",
              "7/DwcABAR0cHEhMTYbPZMGHCBO/9arUakiR5b1+4cAENDQ0YO3ZsnzW1Wi1kWYZOpwMAPPvss3jo\n",
              "oYdgNBqRk5MziF8NkX8xLIjugE6nw6VLl7y3XS4XrFar93ZSUhLGjx+P77777pZrtLW1Ye3atXjy\n",
              "ySexa9cufPrpp1iyZMlgtk3kNzxnQXQH1q5di9dffx3nzp2D3W7H73//e7S0tHjvX758ORwOBzZu\n",
              "3Ii2tjYAQGNjI3bu3AnAc0J77dq1yMzMxF//+lds374da9asQXV1tSJfD5GvGBZEd+C3v/0tli9f\n",
              "jjlz5kCn06G3txczZ8703h8ZGYmjR49ClmVkZWUhKioKDz74II4cOQIAePXVV1FZWek9oW00GvH4\n",
              "44+joKAA3d3dSn1ZRHdMJQR/bo+IiG6PkwUREQ2IYUFERANiWBAR0YAYFkRENCCfwqKnpwfLli3D\n",
              "pEmTkJ2djXnz5qGqqgqA5+MMJkyYgJycHOTk5OCNN94YlIaJiGjo+fxLeevWrcOCBQugUqnw1ltv\n",
              "4amnnsKhQ4cAAG+88QaWLVvm5xaJiEhpPk0WoaGhWLhwofeDz/Lz8/v8VisREY1O93TOoqSkBEuX\n",
              "LvXefuGFF5CVlYXVq1ff9jdT7XY72tvb+/x5/fXX76UVIiIaRHcdFlu2bEFVVRW2bt0KAPjggw9w\n",
              "7tw5VFZW4uGHH8bixYtv+dytW7ciOjq6z5/du3ffbStERDTI7uo3uF977TWUlpbiwIEDiImJ6fcx\n",
              "oaGhqKmpQWxs7E332e122O32PrWNGzeipKTE11aIiGgI+HyCe9u2bTCZTH2Cwul0orm5GYmJiQCA\n",
              "srIyJCYm9hsUgOdjm7VabZ+aWq32tRUiIhoiPoWFzWbDc889h/T0dMydOxeA5x/+gwcPYtGiRbDb\n",
              "7QgKCkJcXBz27t07KA0TEdHQ8yksdDrdLa8XfOzYMb80RERE/ZObu1BqkbE0JxWZSZFD+tq8+BER\n",
              "0TDW63Tjy7MNMJllfF3VBADotDuxeekDQ9oHw4KIaBiqvnINOy1W7D5uQ3NnLwBApQJmZcRh9qT4\n",
              "Ie+HYUFENEz0OFz455l6mMwy/lN940qMCZFarJqhx+o8PfTjwhTpjWFBRKSwqsYOmMxW7Dlhw9Uu\n",
              "BwDPFPHIpHgYDRJ+MjkBGrWyn/vKsCAiUkCPw4XPT9Wh1GyF+dKNKSI5OhSrZuixKk+P1JgxCnbY\n",
              "F8OCiGgIna/vgMksY88JG9p7nAAAdZAKczMTUDRTjzmTEqAOUinc5c0YFkREg6y714XPKmthMss4\n",
              "Ibd666kxY1CYp8fKGXokRYcq1+AdYFgQEQ2SM7VtKDVb8feKGnTYPVOEJkiFn96XiEKDHg9PjB+W\n",
              "U0R/GBZERH7UaXfi0288U8Q3tjZvXRoXhkKDHium65AQObyniP4wLIiI/OCUrQ07zDL2nqxBZ68L\n",
              "ABCsVuFnU5JgzJPw4I9iETRCpoj+MCyIiO5SR48Dn5ysRalFxumadm99Qlw4jAY9lufqEBehvc0K\n",
              "IwfDgojIB0IInLS2otRsxd5vatHt8EwRIeogLMhKQmGehPz0cd4rio4WDAsiojvQ1u3AJydrsKNc\n",
              "xrn6Dm89IyEChXmeKWJceIiCHQ4uhgUR0S0IIXBCvood5VbsO1WLHocbAKDVBGHR1GQYDRJmjB87\n",
              "6qaI/jAsiIh+oLWrF3tO1MBklnGh8Zq3PjkpEkaDhGU5qYgOC1aww6HHsCAigmeKMF9sgcks4/PT\n",
              "9eh1eqaIMcFqLMlORqFBwjR9TEBMEf1hWBBRQGvp7EXZcRtMFhnVVzq99fuTo1A0U8JjOSmICg2s\n",
              "KaI/DAsiCjhut8DR6maYzDL2n2lAr8szRYSHqPFYTgoK8yRM1UUH7BTRH5/CoqenB4WFhTh79izG\n",
              "jBmDhIQE/OUvf0FGRgYaGxuxZs0afPfdd9Bqtfjzn/+M2bNnD1bfREQ+u9Jhx+7jNpRaZFxu7vLW\n",
              "p+qiYTRIWJKdgggtv4fuj8+7sm7dOixYsAAqlQpvvfUWnnrqKRw6dAgvvPAC8vPz8cUXX8BiseAX\n",
              "v/gFLl68iOBgjm9EpBy3W+CrqiaUmmV8ebYBTrcAAERqNVg6zTNFPJAarXCXw59PYREaGoqFCxd6\n",
              "b+fn5+O1114DAOzatQtVVVUAgLy8PKSkpODw4cP46U9/6sd2iYjuTEN7Dz46ZkWpxQrb1W5vfZoU\n",
              "A6NBwuKpyQgL4RRxp+5pp0pKSrB06VI0NzfD4XAgKSnJe19aWhpkWe73eXa7HXa7vU/N5XLdSytE\n",
              "RHC5BQ5/2wiT2YqD5xrhuj5FRIVqsDxXh0KDHpOTohTucmS667DYsmULqqqq8K9//Qvd3d0DP+F/\n",
              "bN26FZs3b+5Ty8/Pv9tWiCjA1bZ2Y9cxK3ZZrKht6/HW89LGojBPwqKpyQgNVivY4ch3V2Hx2muv\n",
              "Yc+ePThw4ADCwsIQFhYGjUaD+vp673Rx6dIlSJLU7/M3bNiAZ599tk9t48aNd9MKEQUop8uNf5+/\n",
              "ApNZxqHzjbg+RCAmLBjLp+lgNOgxMTFS2SZHEZ/DYtu2bTCZTDhw4ABiYmK89ZUrV+Ltt9/Gpk2b\n",
              "YLFYUFNTgzlz5vS7hlarhVbb95MY1WqmPhENzNrS5ZkijlnR0H7j7ez89HEwGiTMn5LEKWIQ+BQW\n",
              "NpsNzz33HNLT0zF37lwAnn/4y8vL8eqrr+KJJ57AxIkTERISgg8//JA/CUVEfuFwufGv/zbAZLbi\n",
              "yIUrENeniHHhIVgxXYfVeXr8KD5C2SZHOZ/CQqfTQXz/f+kHEhMTsX//fr80RUQEAHJzF0otMnYd\n",
              "s6Hp2o0p4qGMWBgNEubdnwithlPEUODPjRHRsNLrdOPLsw0wmWV8XdXkrcdFaLFiuudcxPjYcAU7\n",
              "DEwMCyIaFqqvXMNOixW7j9vQ3NkLAFCpgIcnxqPIoMej9yUiWB2kcJeBi2FBRIqxO1344nQ9TGYZ\n",
              "/6lu8dYTIrVYnafHqhl66MeFKdghfY9hQURDrqrxGkrNMspO2HC1ywEACFIBj2QmwGiQMDczHhpO\n",
              "EcMKw4KIhkSPw4XPT9Wh1GyF+dKNKSI5OtQ7RaTEjFGwQ7odhgURDarz9R0wmWXsOWFDe48TAKAO\n",
              "UuEnkxNQZJAwe1I81EH8KPDhjmFBRH7X1evEZ5V1KDXLOCG3euupMWNgNOixcoYeiVGhyjVIPmNY\n",
              "EJHfnKltg8ks45OKWnTYPVOEJkiFefcnotAg4eGMOARxihiRGBZEdE+u2Z349JtalJplfGNr89bH\n",
              "x4ZhdZ4eK6brkBDJKWKkY1gQkc+EEDhV0waT2Yq9J2vQ2eu5xECwWoWfTUlCkUHCj9NjOUWMIgwL\n",
              "Irpj7T0OfHLSM0WcqW331ifEhcNo0KMgV4fYCO1tVqCRimFBRLclhMBJaytMZhmfflOHbodnigjR\n",
              "BGHBA0kozJOQnz4OKhWniNGMYUFE/WrrduDvFTUwmWWcq+/w1jMSImA0SFg+LRVjw0MU7JCGEsOC\n",
              "iLyEEDh++Sp2mGXsq6yD3ekGAGg1QVg0NRlFBgnTx4/lFBGAGBZEhKudvdhTUYNSs4wLjde89clJ\n",
              "kTAaJCzLSUV0GK9PE8gYFkQBSgiB8ostMJll/ON0PXqvTxFjgtVYkp0Mo0FCjj6GUwQBYFgQBZzm\n",
              "a3aUnbCh1GxFdVOntz4lJQqFBgnLclIQGcopgvryKSyeeeYZ7N27F5cvX0ZFRQVycnIAAGlpadBq\n",
              "tRgzxvMhYBs2bMDq1av93iwR3R23W+BodTN2mGXsP1MPh8tzxcvwEDUey0lFkUFCli5a4S5pOPMp\n",
              "LFasWIHnn38es2bNuum+nTt3esODiIaHxo4e7D7umSLkli5vPVsXjUKDhCXZKYjQ8g0GGphPR8ns\n",
              "2bMHqw8i8hO3W+CrqiaYymUc+G8DnG7PFBGp1WDZtFQUGvSYksIpgnzjt28p1qxZAyEEDAYDXnnl\n",
              "FcTHx9/ysXa7HXa7vU/N5XL5qxWigNTQ3oNdFitKLVbUtHZ767lSDAoNEhZPTUZYCKcIujt+OXKO\n",
              "HDkCSZLgcDjw4osvYu3atfj8889v+fitW7di8+bNfWr5+fn+aIUooLjcAoe/bcSOciv+fb4RrutT\n",
              "RFSoBstzdSg06DE5KUrhLmk0UAkhhK9PSktLw9///vd+z1HU1dVh0qRJ6OjouPmJ1/U3WWzcuBEl\n",
              "JSW+tkIUkGpbu7HrmBW7LFbUtvV463lpY2E0SFiYlYzQYLWCHdJoc8+TRWdnJxwOB2JiYgAAJpMJ\n",
              "06ZNu+1ztFottNq+HzamVvPAJrodp8uNf5+/ApNZxqHzjbg+RCAmLBgFuToU5ukxMTFS2SZp1PIp\n",
              "LNavX499+/ahvr4e8+fPR2RkJPbv34+CggK4XC4IIZCeno73339/sPolCjjWli7PFHHMiob2GxN5\n",
              "fvo4GA0S5k9J4hRBg86nsNi+fXu/9YqKCr80Q0QeDpcb//pvA3aYrfjqwhV8/2bxuPAQrJyuw+o8\n",
              "PdLjI5RtkgIKfzSCaBi53NyJUosVHx2zoenajSnioYxYGA0S5t2fCK2GUwQNPYYFkcJ6nW7sP1uP\n",
              "UrMVX1c1eetxEVqsnOE5FzE+NlzBDokYFkSKqb5yDTstVuw+bkNzZy8AQKUCZk+Mh9Ggx6P3JSJY\n",
              "HaRwl0QeDAuiIdTjcOGfZ+phMsv4T3WLt54YpcWqGXqsmqGHflyYgh0S9Y9hQTQEqho7YDJbUXbC\n",
              "htYuBwAgSAXMzUxAoUHC3Mx4aDhF0DDGsCAaJD0OF/ZV1qHUIsNy6aq3nhIdilV5nikiJWaMgh0S\n",
              "3TmGBZGfnatvR6nZij0nbGjvcQIA1EEq/GRyAooMEmZPioc6iBcUopGFYUHkB129Tnz2TR1MFhkV\n",
              "cqu3rhs7BoV5eqycoUdiVKhyDRLdI4YF0T04XdOGUouMTypq0WH3TBGaIBXm3Z8Io0HCrIw4BHGK\n",
              "oFGAYUHko2t2Jz79phYms4xKW5u3Pj42DIV5ElZM1yE+UnubFYhGHoYF0R0QQuBUTRtMZhmfnKxF\n",
              "V6/n+ivBahXmT0lCkUFCfnospwgatRgWRLfR3uPAJydrYSqXcbau3VtPjwtHoUGPglwdYiM4RdDo\n",
              "x7Ag+gEhBCqsrTCVy/issg7dDs8UEaIJwsIHkmA0SDBMGAeVilMEBQ6GBdF1bV0OfFxhQ6nFinP1\n",
              "Ny7eNTEhAoUGCcunpWJseIiCHRIph2FBAU0IgWOXr8JklrGvsg52pxsAoNUEYfHUFBgNekwfP5ZT\n",
              "BAU8hgUFpKudvdhTUQOTWUZV4zVvfXJSJIwGCctyUhEdFqxgh0TDC8OCAoYQAuUXW2Ayy/jH6Xr0\n",
              "Xp8ixgSrsXhqMopmSsjRx3CKIOqHT2HxzDPPYO/evbh8+TIqKiqQk5MDALhw4QLWrl2LpqYmREdH\n",
              "491338WUKVMGo18inzVfs6PshA2lZiuqmzq99SkpUTAaJCzNSUFkKKcIotvxKSxWrFiB559/HrNm\n",
              "zepTX79+PdatW4fi4mLs3r0bxcXFsFgsfm2UyBdut8DR6mbsMMvYf6YeDpfnuqThIWo8lpOKIoOE\n",
              "LF20wl0SjRw+hcXs2bNvqjU2NuLYsWPYv38/AKCgoABPP/00qqqqkJGR4Z8uie5QY0cPdh/3TBFy\n",
              "S5e3nq2LhtEgYUl2CsK1fPeVyFf3/LfGarUiOTkZGo1nKZVKBUmSIMvyLcPCbrfDbrf3qblcrntt\n",
              "hQKU2y3wVVUTTOUyDvy3AU63Z4qI1GqwbFoqCg16TEnhFEF0LxT5Fmvr1q3YvHlzn1p+fr4SrdAI\n",
              "Vt/Wg4+OWVFqsaKmtdtbz5ViYDRIWDQ1GWEhnCKI/OGe/ybp9XrU1dXB6XRCo9FACAFZliFJ0i2f\n",
              "s2HDBjz77LN9ahs3brzXVigAuNwCh79txI5yKw6ea8D1IQJRoRosz9XBaJCQmRSpbJNEo9A9h0VC\n",
              "QgJyc3Px4Ycfori4GGVlZdDpdLc9X6HVaqHV9v08HbVafa+t0ChW09qNXRYrdh2zoq6tx1s3pI2D\n",
              "caYeCx5IRmgwjyGiweJTWKxfvx779u1DfX095s+fj8jISFRVVWH79u0oLi7Gli1bEBUVhXfeeWew\n",
              "+qUA4nS5cfBcI0xmGYe/veKdIsaGBaMgV4dCgx4ZCZwiiIaCT2Gxffv2fuuZmZk4evSoXxoisrZ0\n",
              "Yef1KaKx48YPQvw4PRaFBj3mT0niFEE0xHj2j4YFh8uNA2cbsMMs4+uqJojrU0RseAhWTNdhdZ4e\n",
              "6fERyjZJFMAYFqSoS02dKLVYsfu4DU3XbkwRszLiYDRImHd/IkI0QQp2SEQAw4IUYHe68OXZBpjM\n",
              "Mv6vqtlbj4vQYtUMzxQxPjZcwQ6J6IcYFjRkqq9c804RLZ29AACVCpg9MR5Gg4RH70tAsJpTBNFw\n",
              "xLCgQdXjcOGfZ+qxo1xG+cUWbz0xSovVM/RYOUMP/bgwBTskojvBsKBBcaGhAyazFXsqbGjtcgAA\n",
              "glTA3MwEFBokzM2Mh4ZTBNGIwbAgv+lxuLCvsg4ms4xjl6966ynRoViVp8eqGXqkxIxRsEMiulsM\n",
              "C7pn5+rbYSqX8XFFDdp7nAAAdZAKP5mcgCKDhNmT4qEO4gWFiEYyhgXdla5eJz77pg4mi4wKudVb\n",
              "140dg8I8z7mIxKhQ5RokIr9iWJBPTte0odQi45OKWnTYPVOEJkiFefcnwmiQMCsjDkGcIohGHYYF\n",
              "Deia3Ym9J2tRapFRaWvz1sfHhqEwT8KK6TrER2pvswIRjXQMC+qXEAKVtutTxMladPV6Lk4VrFZh\n",
              "/pQkGA0SfpweyymCKEAwLKiP9h4HPjlZC1O5jLN17d56enw4jHkSluemIjaCUwRRoGFYEIQQOCG3\n",
              "otQs47PKOnQ7PFNEiCYICx/wTBGGCeOgUnGKIApUDIsA1tblwMcVNpjMVpxv6PDWJyZEwGjwTBEx\n",
              "YSEKdkhEwwXDIsAIIWC5dBWlZhn7TtXB7nQDALSaICyemoKimXrkSmM5RRBRHwyLAHG1sxdlJ2ww\n",
              "mWV8d6XTW5+cFImimRKW5qQiekywgh0S0XDm17BIS0uDVqvFmDGej3TYsGEDVq9e7c+XIB8IIfCf\n",
              "6haYzDK+OF2PXpdnihgTrMZj2SkoNOiRo4/hFEFEA/L7ZLFz507k5OT4e1nyQdM1O8qO21BqseJi\n",
              "040pYkpKFIwGCUtzUhAZyimCiO4c34YaJdxugf/3XTNMFhn7z9TD4fJclzQ8RI3HclJRZJCQpYtW\n",
              "uEsiGqn8HhZr1qyBEAIGgwGvvPIK4uPjb3qM3W6H3W7vU3O5XP5uJSA0dvRg93EbSs1WyC1d3nq2\n",
              "LhpGg4Ql2SkI1/J7AiK6NyohhPDXYrIsQ5IkOBwOvPjiizh16hQ+//zzmx63adMmbN68uU8tPz8f\n",
              "R48e9Vcro5rbLfBVVRNM5TIO/LcBTrfnf2GkVoNl01JRaNBjSgqnCCLyH7+Gxf+qq6vDpEmT0NHR\n",
              "cdN9/U0WGzduRElJyWC0MmrUt/Xgo2NWlFqsqGnt9tZzpRgUGiQsnpqMsBBOEUTkf377l6WzsxMO\n",
              "hwMxMTEAAJPJhGnTpvX7WK1WC62270dGqNVqf7UyqrjcAoe/bcSOciv+fb4RrutTRFSoBstzdTAa\n",
              "JGQmRSrcJRGNdn4Li4aGBhQUFMDlckEIgfT0dLz//vv+Wj7g1LZ2Y6fFio+OWVHb1uOtG9LGodCg\n",
              "x8KsZIQGM2CJaGj4LSzS09NRUVHhr+UCktPlxsFzjSi1WHHofCOuDxEYGxaMglwdCg16ZCRwiiCi\n",
              "occ3uIcBa0uXZ4o4bkVD+41zOT9Oj4VxpoT5UxKh1XCKICLlMCwU4nC5ceBsA0wWK766cAXf/5hB\n",
              "bHgIVszQoTBPwoS4cGWbJCK6jmExxC41daLUYsXu4zY0XbsxRTw8MQ6FeRLm3Z+IEE2Qgh0SEd2M\n",
              "YTEE7E4X9p9pQKlFxv9VNXvr8ZFarJzumSKk2DAFOyQiuj2GxSD67so1lJpllJ2oQUtnLwBApQJm\n",
              "T4yH0SDh0fsSEKzmFEFEwx/Dws96HC58cboeJrOM8ost3npSVChWzdBhVZ4eurGcIohoZGFY+MmF\n",
              "hg6YzFbsqbChtcsBAAhSAXMzE1BokDA3Mx4aThFENEIxLO5Bd68Ln5+qg8ks49jlq956SnQoVudJ\n",
              "WJWnQ3L0GAU7JCLyD4bFXThX3w5TuYw9FTXo6HECANRBKjw6OQHGmRJmT4yHOogXFCKi0YNhcYe6\n",
              "ep347Js6mCwyKuRWb103dgyMBgkrp+uQEBWqXINERIOIYTGA0zVtMJllfHKyFtfsnilCE6TCz6Yk\n",
              "wmiQ8NCP4hDEKYKIRjmGRT+u2Z3Ye7IWJrOMUzVt3npabBgKDRIKcnWIj9TeZgUiotGFYXGdEAKV\n",
              "Ns8UsfebWnT1eq7cF6IOwvwHkmA06PHj9FioVJwiiCjwBHxYtPc48ElFDUxmK87WtXvr6fHhKDJI\n",
              "WJ6rw7jwEAU7JCJSXkCGhRACJ+RWmMwyPqusRY/DDQAI0QRhUVYyjAYJeWljOUUQEV0XUGHR1uXA\n",
              "ngobSs1WnG+4cbnXSYkRMBok/GJaKmLCOEUQEf3QqA8LIQQsl67CZJbx+ak62J2eKSI0OAiLslJQ\n",
              "NFOPXIlTBBHR7fg1LC5cuIC1a9eiqakJ0dHRePfddzFlyhR/vsQda+nsxZ4TNpjMMr670umtT06K\n",
              "xC9nSngsJxXRY4IV6Y2IaKTxa1isX78e69atQ3FxMXbv3o3i4mJYLBZ/vsRtCSFwtLoZJrMV/zxd\n",
              "j16XZ4oIC1HjsewUFBokZOuiOUUQEfnIb2HR2NiIY8eOYf/+/QCAgoICPP3006iqqkJGRoa/XqZf\n",
              "TdfsKDtuQ6nFiotNN6aIrNRoFBr0eCw7BZGhnCKIiO6W38LCarUiOTkZGo1nSZVKBUmSIMvyTWFh\n",
              "t9tht9v71Fwu11297l+PVOMP/zwHh8tzXdIIrQaP5aTAmCchSxd9V2sSEVFfipzg3rp1KzZv3tyn\n",
              "lp+ff1drZSREwOESyNbHoMigx+KpKQjXjvrz9kREQ0olhBD+WKixsREZGRloaWmBRqOBEALJycn4\n",
              "+uuv72iy2LhxI0pKSnx+XZdb4NuGDtyXHHVP/RMR0a357Wo8CQkJyM3NxYcffggAKCsrg06n6/d8\n",
              "hVarRVRUVJ8/arX6rl5XHaRiUBARDTK/vl+zfft2FBcXY8uWLYiKisI777zjz+WJiEghfg2LzMxM\n",
              "HD161J9LEhHRMMCLQhMR0YD8doL7Xi1fvhxpaWl39VyXywWz2QyDwXDX5z5GOu6BB/fBg/vgwX3w\n",
              "+N99SE9Px29+8xuf1xg2YXEv2tvbER0djba2NkRFBebJbu6BB/fBg/vgwX3w8Mc+8G0oIiIaEMOC\n",
              "iIgGxLAgIqIBjYqw0Gq1eOmll6DVapVuRTHcAw/ugwf3wYP74OGPfRgVJ7iJiGhwjYrJgoiIBhfD\n",
              "goiIBsSwICKiAY34sLhw4QIefPBBTJo0CXl5eThz5ozSLSkiLS0NmZmZyMnJQU5ODnbu3Kl0S4Pu\n",
              "mWeeQVpaGlQqFU6ePOmtB9oxcat9CLRjoqenB8uWLcOkSZOQnZ2NefPmoaqqCoDnEgo///nPMXHi\n",
              "RDzwwAM4cuSIwt0OjtvtwSOPPIIJEyZ4j4c33njDt8XFCDd37lzxzjvvCCGE+Oijj8SMGTOUbUgh\n",
              "48ePFxUVFUq3MaQOHz4srFbrTV97oB0Tt9qHQDsmuru7xb59+4Tb7RZCCPHmm2+KOXPmCCGE+NWv\n",
              "fiVeeuklIYQQZrNZpKamit7eXoU6HTy324M5c+aIjz/++K7XHtGTxffX/X788ccBeK77bbVavUlK\n",
              "o9vs2bOh0+n61ALxmOhvHwJRaGgoFi5cCJVKBcBz9c1Lly4BAHbt2oVf//rXAIC8vDykpKTg8OHD\n",
              "SrU6aG63B/dqRIfF7a77HYjWrFmDrKwsPPnkk7hy5YrS7SiCx0RfgXxMlJSUYOnSpWhubobD4UBS\n",
              "UpL3vrS0tIA4Jr7fg++98MILyMrKwurVq1FdXe3TWiM6LOiGI0eOoLKyEidOnEBcXBzWrl2rdEuk\n",
              "sEA+JrZs2YKqqips3bpV6VYU88M9+OCDD3Du3DlUVlbi4YcfxuLFi31b0A9vkymmoaFBREZGCofD\n",
              "IYQQwu12i8TERHHhwgWFO1NWbW2tiIiIULqNIfO/780H8jFxu3MUgXRM/PGPfxTTp08XV69e9dbC\n",
              "wsJEXV2d93ZeXp748ssvFehuaPS3Bz+k1WpFU1PTHa85oicLX677PZp1dnaitbXVe9tkMmHatGnK\n",
              "NaQgHhMegXpMbNu2DSaTCV9++SViYmK89ZUrV+Ltt98GAFgsFtTU1GDOnDkKdTm4+tsDp9OJhoYG\n",
              "72PKysqQmJiI2NjYO153xH/cx/nz51FcXIzm5mbvdb+zsrKUbmtIVVdXo6CgAC6XC0IIpKeno6Sk\n",
              "5K4vJjVSrF+/Hvv27UN9fT1iY2MRGRmJqqqqgDsm+tuH/fv3B9wxYbPZoNfrkZ6ejsjISACez0Qq\n",
              "Ly9HQ0MDnnjiCVy8eBEhISF46623MHfuXIU79r9b7cHBgwcxZ84c2O12BAUFIS4uDtu2bUN2dvYd\n",
              "rz3iw4KIiAbfiH4bioiIhgbDgoiIBsSwICKiATEsiIhoQAwLIiIaEMOCiIgGxLAgIqIBMSyIiGhA\n",
              "DAsiIhoQw4KIiAbEsCAiogH9f2s8SS1sNjfxAAAAAElFTkSuQmCC\n",
              "\">\n",
              "        \n",
              "      </div>\n",
              "      <script></script>\n",
              "      <script type=\"text/javascript\">\n",
              "        (() => {\n",
              "          const chartElement = document.getElementById(\"chart-6cf3702c-e000-45ee-83ec-c821e51a89b6\");\n",
              "          async function getCodeForChartHandler(event) {\n",
              "            const chartCodeResponse =  await google.colab.kernel.invokeFunction(\n",
              "                'getCodeForChart', [\"chart-6cf3702c-e000-45ee-83ec-c821e51a89b6\"], {});\n",
              "            const responseJson = chartCodeResponse.data['application/json'];\n",
              "            await google.colab.notebook.addCell(responseJson.code, 'code');\n",
              "          }\n",
              "          chartElement.onclick = getCodeForChartHandler;\n",
              "        })();\n",
              "      </script>\n",
              "      <style>\n",
              "        .colab-quickchart-chart-with-code  {\n",
              "            display: block;\n",
              "            float: left;\n",
              "            border: 1px solid transparent;\n",
              "        }\n",
              "\n",
              "        .colab-quickchart-chart-with-code:hover {\n",
              "            cursor: pointer;\n",
              "            border: 1px solid #aaa;\n",
              "        }\n",
              "      </style>"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<google.colab._quickchart_helpers.SectionTitle at 0x7cdbda647280>"
            ],
            "text/html": [
              "<h4 class=\"colab-quickchart-section-title\">Distributions</h4>\n",
              "<style>\n",
              "  .colab-quickchart-section-title {\n",
              "      clear: both;\n",
              "  }\n",
              "</style>"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "import numpy as np\n",
              "from google.colab import autoviz\n",
              "\n",
              "def histogram(df, colname, num_bins=20, figscale=1):\n",
              "  from matplotlib import pyplot as plt\n",
              "  df[colname].plot(kind='hist', bins=num_bins, title=colname, figsize=(8*figscale, 4*figscale))\n",
              "  plt.gca().spines[['top', 'right',]].set_visible(False)\n",
              "  plt.tight_layout()\n",
              "  return autoviz.MplChart.from_current_mpl_state()\n",
              "\n",
              "chart = histogram(_df_1, *['index'], **{})\n",
              "chart"
            ],
            "text/html": [
              "      <div class=\"colab-quickchart-chart-with-code\" id=\"chart-f1d9ad68-95de-4e16-aa2c-ecd0ed077302\">\n",
              "        <img src=\"\n",
              "bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9h\n",
              "AAAPYQGoP6dpAAAVpUlEQVR4nO3de1BU5/3H8c8KzcYLqwl4gSAiAtppCIjVMmpFJ+NETYMWbCrW\n",
              "BqlGrMnQDpkxcVKraEdM0tqYdBzxMtbRGatV01qtpjaJUXsxXqImOl4QybIWwWpE2+LK5fz+8Jed\n",
              "bAQPBzkssu/XzJnhnH322e+zZ4bPnMs+x2EYhiEAAO6hU6ALAAC0f4QFAMAUYQEAMEVYAABMERYA\n",
              "AFOEBQDAFGEBADBFWAAATBEWAABThAXQiPHjx2vx4sUtfv/IkSO1cOHC1isICLDQQBcAtEe7d+8O\n",
              "dAlAu8KRBQDAFGEBNGL06NH62c9+JklyOBx6++23NWLECHXr1k1JSUk6ePCgr21dXZ3mzp2rPn36\n",
              "qGfPnpo3b95d/V26dElTp07VY489pl69eik7O1tXrlyRJO3bt09du3bV4cOHJUmGYejpp5/WM888\n",
              "I+b5RHtBWADNsGbNGq1fv17Xr1/Xk08+qR/84Ae+115//XVt2bJF77//vjwej0JDQ3Xo0CHf616v\n",
              "V08++aSioqJ07tw5lZaWKjQ0VFOnTpV0J5gWLlyoyZMn6+rVq1q8eLHOnDmjDRs2yOFwtPlYgUYZ\n",
              "AO6Snp5uvPrqq4ZhGIYkY/369b7XPv30U0OScfnyZcMwDCM+Pt546623fK/X1dUZPXv2NBYsWGAY\n",
              "hmFs27bNiIqKMhoaGnxtPB6PIckoLy/3bcvKyjKSk5ONrl27Gh9//LGNowOs4wI30AxRUVG+v7t2\n",
              "7SpJunnzpnr37i2Px6P+/fv7Xg8JCVFMTIxv/fz586qsrNQjjzzi16fT6ZTb7VZ0dLQkqaCgQCNG\n",
              "jFB2drZSUlJsHA1gHWEB3Kfo6GiVlZX51uvr61VeXu5b79Onj/r166cLFy402Ud1dbVycnI0Y8YM\n",
              "bdmyRX/605/0zDPP2Fk2YAnXLID7lJOTo1/96lc6c+aMvF6vFi1apGvXrvlez8zMVG1trebPn6/q\n",
              "6mpJUlVVlTZv3izpzgXtnJwcDRw4UKtXr1ZxcbGee+45lZaWBmQ8QGMIC+A+vfzyy8rMzFR6erqi\n",
              "o6N1+/Ztfetb3/K9HhYWpn/84x9yu91KSkqSy+XS8OHDtX//fknSa6+9ppMnT/ouaGdnZ2vatGnK\n",
              "yspSTU1NoIYF+HEYBvfmAQDujSMLAIApwgIAYIqwAACYIiwAAKYICwCAKcICAGCKsAAAmOoQYbF8\n",
              "+fJAlwAAHVqHCIvPPvss0CUAQIfWIcICAGAv28Li1q1bmjRpkhITE5WcnKyxY8eqpKSk0bY7d+7U\n",
              "oEGDlJCQoMzMTN24ccOusgAALWDrkcWsWbN09uxZnThxQhMnTtTMmTPvavOf//xHM2bM0B/+8Aed\n",
              "P39eUVFRWrx4sZ1lAQAssi0sHn74YU2YMMH3WMi0tDS/Of+/sHv3bg0ePFiDBg2SJM2ZM0ebNm2y\n",
              "qywAQAu02cOPli9frokTJ9613e12q1+/fr712NhYVVRUqK6uTqGhd5fn9Xrl9Xr9ttXX17d+wQAA\n",
              "nzYJiyVLlqikpETvvffeffdVVFSkwsJCv21paWkt7i/2lV0tfm/Z0qdb/N4HFd9X8/FdWRNs39eD\n",
              "Nl7b74b65S9/qe3bt2v37t3q0qXLXa/HxMT43fpaVlamyMjIRo8qJGnevHmqrq72W4YNG2Zb/QAA\n",
              "m8Ni2bJl2rRpk/bu3asePXo02mbcuHE6duyYzpw5I0lasWKFpkyZ0mSfTqdTLpfLbwkJCbGjfADA\n",
              "/7PtNJTH49FLL72kuLg4jRkzRtKdf/SHDh3Sz3/+c0VFRWn27NkKCwvTmjVrNGnSJNXV1enxxx/X\n",
              "+vXr7SoLANACtoVFdHS0mnpi66JFi/zWMzIylJGRYVcpAID7xC+4AQCmCAsAgCnCAgBgirAAAJgi\n",
              "LAAApggLAIApwgIAYIqwAACYIiwAAKYICwCAKcICAGCKsAAAmCIsAACmCAsAgCnCAgBgirAAAJgi\n",
              "LAAApggLAIApwgIAYIqwAACYIiwAAKYICwCAKcICAGCKsAAAmLI1LPLz8xUbGyuHw6Hjx4832mbf\n",
              "vn3q3LmzUlJSfEtNTY2dZQEALAq1s/PJkydr7ty5Gjly5D3bDRw4sMkwAQAEnq1hMWrUKDu7BwC0\n",
              "EVvDorkuXLig1NRUhYSEKDc3V3PmzGmyrdfrldfr9dtWX19vd4kAENQCHhapqanyeDzq3r27PB6P\n",
              "JkyYoIiICD377LONti8qKlJhYaHftrS0tLYoFQCCVsDvhnK5XOrevbskKTo6WtnZ2Tpw4ECT7efN\n",
              "m6fq6mq/ZdiwYW1VLgAEpYCHRUVFhRoaGiRJN2/e1M6dOzV48OAm2zudTrlcLr8lJCSkrcoFgKBk\n",
              "OSzefffdZrfNy8tTdHS0PB6PnnrqKcXHx0uSZs6cqR07dkiStm3bpqSkJCUnJystLU1jx45Vbm6u\n",
              "1bIAADayfM1i0aJFys/P15w5c5SbmyuXy9Vk2+Li4ka3r1mzxvf3iy++qBdffNFqGQCANmT5yOJv\n",
              "f/ubfve73+nTTz9VYmKi5syZo9OnT9tRGwCgnWjRNYvBgwdr9erV2rNnj3bu3KknnnhCY8eO1Sef\n",
              "fNLa9QEA2oEWhcVf//pXTZw4UZmZmXrhhRd0+fJl5eXl6bvf/W5r1wcAaAcsX7P4+te/roiICOXn\n",
              "5yszM9N3J9LkyZO1du3aVi8QABB4lsNi48aNGjJkSKOv7d69+74LAgC0P5ZPQx09elTXrl3zrV+9\n",
              "elWrV69u1aIAAO2L5bBYsWKFHn30Ud96eHi4VqxY0apFAQDaF8thYRjGXduYyA8AOjbLYREZGakt\n",
              "W7b41jdv3qzIyMhWLQoA0L5YvsD95ptvauLEiZo7d64kqUuXLvrjH//Y6oUBANoPy2ExaNAgnT59\n",
              "WmfPnpV05yl3TOQHAB1bi55n4XA41KNHD9XV1enSpUuSpJiYmFYtDADQflgOi9/+9rfKz8/X1772\n",
              "NXXqdOeSh8PhUFVVVasXBwBoHyyHxeLFi3X48GENHDjQjnoAAO2Q5buhIiIiCAoACDKWw2LSpEl6\n",
              "8803VVVVpRs3bvgWAEDHZfk01KuvvipJKigokMPhkGEYcjgc/DAPADowy2HxxfOyAQDBo0XPszh6\n",
              "9Kg2bNggSbp+/boqKipatSgAQPvSookEf/SjH2nhwoWS7sw6O3Xq1NauCwDQjlgOi1WrVumf//yn\n",
              "XC6XJGnAgAG6cuVKqxcGAGg/LIeF0+lU586d/baFhrboh+AAgAeE5bDo2bOnzp07J4fDIenOL7qZ\n",
              "6gMAOrYWzTqbnZ2tM2fOqG/fvnK5XNq5c6cdtQEA2gnLRxbx8fE6dOiQjh49qnfffVcnT55U//79\n",
              "G22bn5+v2NhYORwOHT9+vMk+165dq4SEBA0YMEDPP/+8amtrrZYFALCR5bBwu93yeDzq2rWrunXr\n",
              "pkuXLsntdjfadvLkyTp48KD69evXZH8XL17U/PnzdeDAAZWUlKiyslKrVq2yWhYAwEaWT0MNGTLE\n",
              "98vtW7du6X//+5/Cw8MbnXV21KhRpv1t3bpVGRkZ6tOnjyRp9uzZWrJkiV544QWrpQEAbGI5LL56\n",
              "m+z27dt14sSJFhfgdrv9jjxiY2ObPFKRJK/XK6/X67eNqUYAwF73fc9rZmamlixZosLCwtaox1RR\n",
              "UdFdn5WWltYmn/1Vsa/sCsjnPqj4vpqP78oavi/7Wb5m8eWZZj///HPt2bPnvmadjYmJ0WeffeZb\n",
              "Lysru+etuPPmzVN1dbXfMmzYsBZ/PgDAnOUjix49eviuWYSEhCghIUFvvfVWiwvIysrSyJEjtXDh\n",
              "QvXu3VsrV67UlClTmmzvdDrldDr9tvEMcACwl+Uji4aGBtXX16uhoUG1tbU6ffq0xo0b12jbvLw8\n",
              "RUdHy+Px6KmnnlJ8fLwkaebMmdqxY4ckKS4uToWFhRoxYoTi4+PVs2dP5eXl3ceQAACtzWEYhhHo\n",
              "Iu5XQUGBli1b1qL3cq4TwIOmbOnTbf6Zlk9DderUyTfVx5fxECQA6Lgsh8WiRYtUU1OjH//4x5Kk\n",
              "lStXqnPnzvrpT3/a2rUBANoJy2Hxzjvv6OjRo771X/ziFxoyZIjvcasAgI7H8gXumzdv+v1au6qq\n",
              "Sjdv3mzVogAA7YvlI4uXXnpJycnJmjBhgiRpz549vqfmAQA6JsthkZeXpxEjRuiDDz6QdOdOpG98\n",
              "4xutXhgAoP1o0XQf4eHhSkpK0ujRo1VXV6fbt2/roYceau3aAADthOVrFlu3blVaWppyc3MlSadO\n",
              "ndKkSZNauy4AQDtiOSyKiop07Ngx9ejRQ5KUnJzsN7cTAKDjsRwWISEhCg8P99vGKSgA6Ngsh0VY\n",
              "WJgqKyt9v+J+77339Oijj7Z6YQCA9sPyBe7XXntN48ePV2lpqUaOHKmLFy9q1y7mVwKAjsxSWHwx\n",
              "4+wHH3ygv//97zIMQ8OHD/ddvwAAdEyWwqJTp06aNWuWTpw4ofHjx9tVEwCgnbF8zSIhIUElJSV2\n",
              "1AIAaKcsX7O4du2aUlJSNHz4cHXr1s23ffv27a1aGACg/Wh2WMyaNUurVq1STk6OMjIy9Mgjj9hZ\n",
              "FwCgHWl2WBw5ckSSlJOTo9TUVB07dsy2ogAA7YvlaxbSnafiAQCCR7OPLGpqavTJJ5/IMAzdunXL\n",
              "9/cXnnjiCVsKBAAEnqWwyMjI8K1/+W+Hw6HS0tLWrQwA0G40OyzKyspsLAMA0J616JoFACC42BoW\n",
              "58+f1/Dhw5WYmKihQ4fq1KlTd7XZt2+fOnfurJSUFN9SU1NjZ1kAAIta9KS85srLy9OsWbM0ffp0\n",
              "bd26VdOnT9fhw4fvajdw4EAdP37czlIAAPfBtiOLqqoqHTlyRNOmTZMkZWVlqby8nKlCAOABZFtY\n",
              "lJeXKzIyUqGhdw5eHA6HYmJi5Ha772p74cIFpaamaujQoVqxYsU9+/V6vbpx44bfUl9fb8sYAAB3\n",
              "2HoaqjlSU1Pl8XjUvXt3eTweTZgwQREREXr22WcbbV9UVKTCwkK/bWlpaW1RKgAELduOLPr27auK\n",
              "igrV1dVJuvOrb7fbrZiYGL92LpdL3bt3lyRFR0crOztbBw4caLLfefPmqbq62m8ZNmyYXcMAAMjG\n",
              "sOjVq5dSU1O1ceNGSdK2bdsUHR2t+Ph4v3YVFRVqaGiQJN28eVM7d+7U4MGDm+zX6XTK5XL5LSEh\n",
              "IXYNAwAgm2+dLS4uVnFxsRITE7V06VKtW7dOkjRz5kzt2LFD0p0QSUpKUnJystLS0jR27Fjl5uba\n",
              "WRYAwCKH0QFmBSwoKNCyZcta9N7YV3h+OIAHS9nSp9v8M/kFNwDAFGEBADBFWAAATBEWAABThAUA\n",
              "wBRhAQAwRVgAAEwRFgAAU4QFAMAUYQEAMEVYAABMERYAAFOEBQDAFGEBADBFWAAATBEWAABThAUA\n",
              "wBRhAQAwRVgAAEwRFgAAU4QFAMAUYQEAMEVYAABMERYAAFO2hsX58+c1fPhwJSYmaujQoTp16lSj\n",
              "7dauXauEhAQNGDBAzz//vGpra+0sCwBgka1hkZeXp1mzZuncuXN6+eWXNX369LvaXLx4UfPnz9eB\n",
              "AwdUUlKiyspKrVq1ys6yAAAW2RYWVVVVOnLkiKZNmyZJysrKUnl5uUpKSvzabd26VRkZGerTp48c\n",
              "Dodmz56tTZs22VUWAKAFQu3quLy8XJGRkQoNvfMRDodDMTExcrvdio+P97Vzu93q16+fbz02NlZu\n",
              "t7vJfr1er7xer9+2+vr6Vq4eAPBltoWFXYqKilRYWOi3bdCgQSooKLDcV319vSI/+kjDhg1TSEhI\n",
              "a5X4QKivr9dHjJ2xB5GONPaCgvcstf/y2OPi4vSTn/zE8mc6DMMwLL+rGaqqqhQfH69r164pNDRU\n",
              "hmEoMjJSBw8e9DuyeOONN3ThwgWtXLlSkvTnP/9ZS5Ys0cGDBxvtt7EjC6fTKafTabnGGzduqHv3\n",
              "7qqurpbL5bL8/gcZY2fsjD14tMbYbbtm0atXL6Wmpmrjxo2SpG3btik6OtovKKQ71zJ27Nihy5cv\n",
              "yzAMrVy5UlOmTGmyX6fTKZfL5be0JCgAAM1n691QxcXFKi4uVmJiopYuXap169ZJkmbOnKkdO3ZI\n",
              "kuLi4lRYWKgRI0YoPj5ePXv2VF5enp1lAQAssu001IOAw1LGztiDB2Nvp6ehHgROp1MLFiwIytNY\n",
              "jJ2xBxvGfn9jD+ojCwBA8wT1kQUAoHkICwCAKcICAGAqaMOiuTPidkSxsbEaOHCgUlJSlJKSos2b\n",
              "Nwe6JNvk5+crNjZWDodDx48f920Phv3f1NiDYf/funVLkyZNUmJiopKTkzV27FjfvHRVVVUaN26c\n",
              "EhIS9Pjjj2v//v0BrrZ13Wvso0ePVv/+/X37/te//nXzOzaC1JgxY4x169YZhmEYv//9741vfvOb\n",
              "gS2oDfXr18/4+OOPA11Gm/jwww+N8vLyu8YcDPu/qbEHw/6vqakxdu3aZTQ0NBiGYRhvv/22kZ6e\n",
              "bhiGYeTm5hoLFiwwDMMwPvroI+Oxxx4zbt++HaBKW9+9xp6enm688847Leo3KI8smjsjLh58o0aN\n",
              "UnR0tN+2YNn/jY09WDz88MOaMGGCHA6HJCktLU1lZWWSpC1btmj27NmSpKFDhyoqKkoffvhhoEpt\n",
              "dfca+/0IyrC414y4weK5555TUlKSZsyYoStXrgS6nDbF/g++/b98+XJNnDhRV69eVW1trfr06eN7\n",
              "zWym6wfdF2P/wiuvvKKkpCR9//vfV2lpabP7CcqwCHb79+/XyZMndezYMUVERCgnJyfQJaENBdv+\n",
              "X7JkiUpKSlRUVBToUtrcV8e+YcMGnTlzRidPntS3v/1tfec732l+Z610muyBUllZaYSFhRm1tbWG\n",
              "YRhGQ0OD0bt3b+P8+fMBrqzt/etf/zK6desW6DJs9+Xz9MG2/+91jaKj7/833njDGDJkiPH555/7\n",
              "tnXp0sWoqKjwrQ8dOtTYu3dvAKqzV2Nj/yqn02n8+9//blZ/QXlk0dwZcTui//73v7p+/bpvfdOm\n",
              "TRo8eHDgCgoA9v9133pH3v/Lli3Tpk2btHfvXvXo0cO3/Xvf+57vkQiHDx/WpUuXlJ6eHqAq7dHY\n",
              "2Ovq6lRZWelrs23bNvXu3Vvh4eHN6jNop/s4e/aspk+frqtXr8rlcmndunVKSkoKdFm2Ky0tVVZW\n",
              "lurr62UYhuLi4rR8+XLFxsYGujRb5OXladeuXbp8+bLCw8MVFhamkpKSoNj/jY39L3/5S1Dsf4/H\n",
              "o759+youLk5hYWGS7syPdOjQIVVWVuqHP/yhLl68qIceeki/+c1vNGbMmABX3HqaGvv777+v9PR0\n",
              "eb1ederUSREREVq2bJmSk5Ob1W/QhgUAoPmC8jQUAMAawgIAYIqwAACYIiwAAKYICwCAKcICAGCK\n",
              "sAAAmCIsAACmCAsAgCnCAgBgirAAAJj6P2zzrqKZhleJAAAAAElFTkSuQmCC\n",
              "\">\n",
              "        \n",
              "      </div>\n",
              "      <script></script>\n",
              "      <script type=\"text/javascript\">\n",
              "        (() => {\n",
              "          const chartElement = document.getElementById(\"chart-f1d9ad68-95de-4e16-aa2c-ecd0ed077302\");\n",
              "          async function getCodeForChartHandler(event) {\n",
              "            const chartCodeResponse =  await google.colab.kernel.invokeFunction(\n",
              "                'getCodeForChart', [\"chart-f1d9ad68-95de-4e16-aa2c-ecd0ed077302\"], {});\n",
              "            const responseJson = chartCodeResponse.data['application/json'];\n",
              "            await google.colab.notebook.addCell(responseJson.code, 'code');\n",
              "          }\n",
              "          chartElement.onclick = getCodeForChartHandler;\n",
              "        })();\n",
              "      </script>\n",
              "      <style>\n",
              "        .colab-quickchart-chart-with-code  {\n",
              "            display: block;\n",
              "            float: left;\n",
              "            border: 1px solid transparent;\n",
              "        }\n",
              "\n",
              "        .colab-quickchart-chart-with-code:hover {\n",
              "            cursor: pointer;\n",
              "            border: 1px solid #aaa;\n",
              "        }\n",
              "      </style>"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<google.colab._quickchart_helpers.SectionTitle at 0x7cdbda541570>"
            ],
            "text/html": [
              "<h4 class=\"colab-quickchart-section-title\">Time series</h4>\n",
              "<style>\n",
              "  .colab-quickchart-section-title {\n",
              "      clear: both;\n",
              "  }\n",
              "</style>"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "import numpy as np\n",
              "from google.colab import autoviz\n",
              "\n",
              "def time_series_multiline(df, timelike_colname, value_colname, series_colname, figscale=1, mpl_palette_name='Dark2'):\n",
              "  from matplotlib import pyplot as plt\n",
              "  import seaborn as sns\n",
              "  figsize = (10 * figscale, 5.2 * figscale)\n",
              "  palette = list(sns.palettes.mpl_palette(mpl_palette_name))\n",
              "  def _plot_series(series, series_name, series_index=0):\n",
              "    if value_colname == 'count()':\n",
              "      counted = (series[timelike_colname]\n",
              "                 .value_counts()\n",
              "                 .reset_index(name='counts')\n",
              "                 .rename({'index': timelike_colname}, axis=1)\n",
              "                 .sort_values(timelike_colname, ascending=True))\n",
              "      xs = counted[timelike_colname]\n",
              "      ys = counted['counts']\n",
              "    else:\n",
              "      xs = series[timelike_colname]\n",
              "      ys = series[value_colname]\n",
              "    plt.plot(xs, ys, label=series_name, color=palette[series_index % len(palette)])\n",
              "\n",
              "  fig, ax = plt.subplots(figsize=figsize, layout='constrained')\n",
              "  df = df.sort_values(timelike_colname, ascending=True)\n",
              "  if series_colname:\n",
              "    for i, (series_name, series) in enumerate(df.groupby(series_colname)):\n",
              "      _plot_series(series, series_name, i)\n",
              "    fig.legend(title=series_colname, bbox_to_anchor=(1, 1), loc='upper left')\n",
              "  else:\n",
              "    _plot_series(df, '')\n",
              "  sns.despine(fig=fig, ax=ax)\n",
              "  plt.xlabel(timelike_colname)\n",
              "  plt.ylabel(value_colname)\n",
              "  return autoviz.MplChart.from_current_mpl_state()\n",
              "\n",
              "chart = time_series_multiline(_df_2, *['index', 'count()', None], **{})\n",
              "chart"
            ],
            "text/html": [
              "      <div class=\"colab-quickchart-chart-with-code\" id=\"chart-6f27e1e2-13ed-4911-84dd-fd64d306e6d4\">\n",
              "        <img src=\"\n",
              "bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9h\n",
              "AAAPYQGoP6dpAAAY/UlEQVR4nO3deVCU9x3H8c8Cuh4VNIpHiuuKiEZF8WLiEdEmHTGNRMUYm6ol\n",
              "9cCZOFqp1TgNjSatJo3FUJMO2nFs1ampVZNxtO201VbxaNEq2uIRUXHBCB6jYKwgx9M/nOx04xFW\n",
              "93GF3/s188x0dx+f/e4zT/NmHx52HZZlWQIAAMYICfYAAADg0SL+AAAYhvgDAGAY4g8AgGGIPwAA\n",
              "hiH+AAAYhvgDAGAY4g8AgGEafPyzsrKCPQIAAI+VBh//c+fOBXsEAAAeKw0+/gAAwBfxBwDAMMQf\n",
              "AADDEH8AAAxD/AEAMAzxBwDAMMQfAADDEH8AAAxD/AEAMAzxBwDAMMQfAADDEH8AAAxD/AEAMAzx\n",
              "BwDAMMQfAADDEH8AAAxD/AEAMAzxBwDAMMQfAADDEH8AAAxD/AEAMAzxBwDAMMQfAADDEH8AAAxD\n",
              "/AEAMIyt8Z89e7bcbrccDofy8vLuud7q1avVtWtXdenSRdOnT1dVVZXP45Zl6Rvf+IZatmxp57gA\n",
              "ABjB1viPHz9ee/bsUadOne65ztmzZ5WRkaGcnBwVFBSotLRUq1at8lln+fLl6tKli52jAgBgDFvj\n",
              "P2zYMEVFRd13nU2bNik5OVnt27eXw+HQzJkztWHDBu/j+fn5+uSTT/T6669/5fNVVlaqvLzcZ6mp\n",
              "qXno1wEAQEMS9N/5ezwenzMDbrdbHo9HklRVVaXp06dr5cqVCg0N/cptLV26VBERET5Lbm6ubbMD\n",
              "AFAfBT3+97N48WKNGzdOTz31VJ3WX7hwocrKynyWhIQEm6cEAKB+CQv2AC6XS6dPn/beLiwslMvl\n",
              "kiTt2rVLHo9HH3zwgaqrq1VeXi63260DBw4oMjLyjm05nU45nU6f++pyxgAAAJME/Z1/SkqKtm7d\n",
              "qpKSElmWpezsbE2cOFGSlJOTo3PnzqmwsFB79uxReHi4CgsL7xp+AABQN7bGPy0tTVFRUSouLtbI\n",
              "kSMVExMjSZo2bZq2bt0qSYqOjtbixYs1ZMgQxcTEKDIyUmlpaXaOBQCA0RyWZVnBHsJO6enpyszM\n",
              "DPYYAAA8NoJ+2h8AADxaxB8AAMMQfwAADEP8AQAwDPEHAMAwxB8AAMMQfwAADEP8AQAwDPEHAMAw\n",
              "xB8AAMMQfwAADEP8AQAwDPEHAMAwxB8AAMMQfwAADEP8AQAwDPEHAMAwxB8AAMMQfwAADEP8AQAw\n",
              "DPEHAMAwxB8AAMMQfwAADEP8AQAwDPEHAMAwxB8AAMMQfwAADEP8AQAwDPEHAMAwxB8AAMMQfwAA\n",
              "DGNr/GfPni232y2Hw6G8vLx7rrd69Wp17dpVXbp00fTp01VVVSVJ2rlzpxISEtSjRw/17NlT8+fP\n",
              "V21trZ0jAwDQ4Nka//Hjx2vPnj3q1KnTPdc5e/asMjIylJOTo4KCApWWlmrVqlWSpFatWumjjz7S\n",
              "sWPH9K9//Uv79u3T2rVr7RwZAIAGz9b4Dxs2TFFRUfddZ9OmTUpOTlb79u3lcDg0c+ZMbdiwQZLU\n",
              "t29fRUdHS5KaNGmi+Ph4FRYW2jkyAAANXliwB/B4PD5nBtxutzwezx3rlZSUaNOmTdq2bds9t1VZ\n",
              "WanKykqf+2pqagI3LAAADUC9uOCvvLxco0eP1vz58zVgwIB7rrd06VJFRET4LLm5uY9wUgAAHn9B\n",
              "j7/L5dK5c+e8twsLC+Vyuby3r1+/rqSkJL344otKT0+/77YWLlyosrIynyUhIcG22QEAqI+CHv+U\n",
              "lBRt3bpVJSUlsixL2dnZmjhxoiTp888/V1JSkpKSkvTGG2985bacTqfCw8N9ltDQULtfAgAA9Yqt\n",
              "8U9LS1NUVJSKi4s1cuRIxcTESJKmTZumrVu3SpKio6O1ePFiDRkyRDExMYqMjFRaWpokKSsrS7m5\n",
              "udqyZYvi4+MVHx+vn/70p3aODABAg+ewLMsK9hB2Sk9PV2ZmZrDHAADgsRH00/4AAODRIv4AABiG\n",
              "+AMAYBjiDwCAYYg/AACGIf4AABiG+AMAYBjiDwCAYYg/AACGIf4AABiG+AMAYBjiDwCAYYg/AACG\n",
              "If4AABiG+AMAYBjiDwCAYYg/AACGCXuQf3Ts2DEVFxeradOmiouLU8uWLQM8FgAAsEud43/9+nUt\n",
              "W7ZMv/rVr9SsWTO1a9dOFRUVOn36tBISErRgwQI9++yzds4KAAACoM7xHzFihKZMmaLDhw+rXbt2\n",
              "3vtra2uVk5Oj7OxsFRQUKC0tzZZBAQBAYNQ5/nv37pXT6bzj/pCQECUmJioxMVGVlZUBHQ4AAARe\n",
              "nS/4u1v4H2QdAAAQXHWO/wsvvKB9+/bd9bFr167p5z//uVauXBmwwQAAgD3qfNp/yZIlWrhwoY4d\n",
              "O6aBAwd6L/g7ceKEzp8/r9dee03f+9737JwVAAAEQJ3j37t3b23fvl1FRUXatWuXiouL1axZM33n\n",
              "O9/R0KFDFRb2QH81CAAAHjG/i3316lVNmjTJ576jR4+qd+/eARsKAADYx+9P+EtNTa3TfQAA4PFU\n",
              "53f+Fy9eVElJiW7evKl///vfsixLklRWVqYbN27YNiAAAAisOsd/w4YNev/99/XZZ58pOTnZe39E\n",
              "RITmz59vy3AAACDw6hz/OXPmaM6cOXr77beVkZFh50wAAMBGfl/wl5GRodraWpWUlKi6utp7v8vl\n",
              "CuhgAADAHn5f8Peb3/xGLVu2VFxcnPr376/+/ftrwIABd1139uzZcrvdcjgcysvLu+c2V69era5d\n",
              "u6pLly6aPn26qqqq6vQYAADwn9/xf+utt3TgwAFduXJFly5d0qVLl3Tx4sW7rjt+/Hjt2bNHnTp1\n",
              "uuf2zp49q4yMDOXk5KigoEClpaVatWrVVz4GAAAejN+n/du0aaNu3brVad1hw4Z95TqbNm1ScnKy\n",
              "2rdvL0maOXOmlixZotdee+2+jz1qlmXpZjVnHQAAD69pWCM5HI6gPb/f8R8zZozef/99vfLKK2rS\n",
              "pIn3/vDw8AcawOPx+JwZcLvd8ng8X/nY3VRWVt7xzYI1NTUPNNeX3ayuUuz6HwdkWwAAs3066S01\n",
              "a9Q4aM/v92n/H/3oR0pPT1f79u3VqlUrtWzZUq1atbJjNr8tXbpUERERPktubm6wxwIA4LHi9zv/\n",
              "2tragA7gcrl0+vRp7+3CwkLvXw7c77G7WbhwodLT033uC9SfJTYNa6RPJ70VkG0BAMzWNKxRUJ8/\n",
              "6N/Gk5KSoqFDh2rRokVq166dsrOzNXHixK987G6cTqecTqfPfaGhoQGZ0+FwBPUUDQAAgeL3af+Q\n",
              "kBCFhobesdxNWlqaoqKiVFxcrJEjRyomJkaSNG3aNG3dulWSFB0drcWLF2vIkCGKiYlRZGSk0tLS\n",
              "vvIxAADwYBzWFx/SX0f//zn+N2/e1Nq1a1VTU6Mf/vCHAR8uENLT05WZmRnsMQAAeGz4/c6/efPm\n",
              "3qVNmzZKT0/Xpk2b7JgNAADYwO/4f9mJEyd0+fLlQMwCAAAeAb8v+GvVqpX3gwm++Gz/FStWBHYq\n",
              "AABgG7/j//+f0R8WFqb27dsH7Ip6AABgP7/j36lTJ/33v//1/hDQqlUrNWvWLNBzAQAAm/gd/337\n",
              "9iklJcX7efulpaXavHmzBg0aFPDhAABA4Pkd/y+u7h8yZIik2z8MzJ07V//4xz8CPhwAAAg8v6/2\n",
              "v3nzpjf8kjR48GBVVFQEdCgAAGAfv+P/ta99TX/961+9t3fs2KHmzZsHdCgAAGAfv0/7/+IXv9C4\n",
              "ceO8V/jX1tZqy5YtAR8MAADYw+/4f/bZZzp48KBKS0slSe3ateNrcwEAqEf8Pu2fkZGhyMhI9erV\n",
              "S7169VKbNm0C9rW5AADAfg/98b4Oh0M1NTWBmAUAADwCfse/RYsW2rdvn/f23r171aJFi4AOBQAA\n",
              "7OP37/x/9rOfaezYserevbsk6dSpU/r4448DPhgAALCH3/EfNGiQjh8/rv3790u6/Xf+LVu2DPRc\n",
              "AADAJn7HX7r9ef7PP/98oGcBAACPwENf8AcAAOoX4g8AgGGIPwAAhiH+AAAYhvgDAGAY4g8AgGGI\n",
              "PwAAhiH+AAAYhvgDAGAY4g8AgGGIPwAAhiH+AAAYhvgDAGAY4g8AgGFsjf+pU6c0ePBgxcbGauDA\n",
              "gcrPz79jndraWs2bN0+9evVS9+7dNXXqVN26dcv7+LvvvqsePXooPj5eTz/9tHJzc+0cGQCABs/W\n",
              "+KelpWnGjBn69NNPtWDBAqWmpt6xzurVq3Xo0CEdOnRIx48fV0hIiLKysiRJeXl5+uUvf6nc3Fzl\n",
              "5eVp1qxZmjVrlp0jAwDQ4NkW/4sXL+rgwYOaNGmSJCklJUVFRUUqKCjwWe/IkSN67rnn1LhxYzkc\n",
              "Do0aNUrr1q2TJDkcDlVVVenGjRuSpGvXrikqKsqukQEAMEKYXRsuKipShw4dFBZ2+ykcDodcLpc8\n",
              "Ho9iYmK86/Xv318rV67UrFmz1LRpU23cuFGFhYWSpD59+mju3Lnq3LmznnjiCTmdTu3evfuez1lZ\n",
              "WanKykqf+2pqagL/4gAAqMeCfsFfamqqkpKSlJiYqMTERMXGxnp/YDh79qy2bNmigoICFRcXa+7c\n",
              "uXr55Zfvua2lS5cqIiLCZ+EaAQAAfNkW/44dO+rChQuqrq6WJFmWJY/HI5fL5bOew+HQokWLdPjw\n",
              "Ye3bt089evRQz549JUmbN29WXFycnnzySUnSq6++qr179/pcEPj/Fi5cqLKyMp8lISHBrpcIAEC9\n",
              "ZFv827Ztq379+mn9+vWSboc8KirK55S/JFVUVOjq1auSpMuXL+udd97R/PnzJUnR0dHau3evPv/8\n",
              "c0nStm3bFBsbq8aNG9/1OZ1Op8LDw32W0NBQu14iAAD1km2/85eklStXKjU1VUuWLFF4eLjWrFkj\n",
              "SZo2bZqSk5OVnJyssrIyDR8+XCEhIaqtrdWcOXM0evRoSdLYsWN14MABDRgwQE6nU82bN9dvf/tb\n",
              "O0cGAKDBc1iWZQV7CDulp6crMzMz2GMAAPDYCPoFfwAA4NEi/gAAGIb4AwBgGOIPAIBhiD8AAIYh\n",
              "/gAAGIb4AwBgGOIPAIBhiD8AAIYh/gAAGIb4AwBgGOIPAIBhiD8AAIYh/gAAGIb4AwBgGOIPAIBh\n",
              "iD8AAIYh/gAAGIb4AwBgGOIPAIBhiD8AAIYh/gAAGIb4AwBgGOIPAIBhiD8AAIYh/gAAGIb4AwBg\n",
              "GOIPAIBhiD8AAIYh/gAAGIb4AwBgGFvjf+rUKQ0ePFixsbEaOHCg8vPz71intrZW8+bNU69evdS9\n",
              "e3dNnTpVt27d8j7u8Xg0evRodevWTT169NCKFSvsHBkAgAbP1vinpaVpxowZ+vTTT7VgwQKlpqbe\n",
              "sc7q1at16NAhHTp0SMePH1dISIiysrIkSZZlaezYsZoyZYpOnjypY8eOacKECXaODABAg2db/C9e\n",
              "vKiDBw9q0qRJkqSUlBQVFRWpoKDAZ70jR47oueeeU+PGjeVwODRq1CitW7dOkrRjxw45nU699NJL\n",
              "3vXbtWtn18gAABjBtvgXFRWpQ4cOCgsLkyQ5HA65XC55PB6f9fr376+tW7eqvLxcVVVV2rhxowoL\n",
              "CyVJx44dU2RkpCZOnKi+fftq7NixOnPmzD2fs7KyUuXl5T5LTU2NXS8RAIB6KegX/KWmpiopKUmJ\n",
              "iYlKTExUbGys9weG6upq7dy5UxkZGTp8+LBGjhx539P+S5cuVUREhM+Sm5v7qF4KAAD1gm3x79ix\n",
              "oy5cuKDq6mpJt39/7/F45HK5fNZzOBxatGiRDh8+rH379qlHjx7q2bOnJMnlcqlv377e25MnT9ah\n",
              "Q4dUVVV11+dcuHChysrKfJaEhAS7XiIAAPWSbfFv27at+vXrp/Xr10uSNm/erKioKMXExPisV1FR\n",
              "oatXr0qSLl++rHfeeUfz58+XJI0aNUrFxcU6f/68JOkPf/iDnnrqKTVq1Oiuz+l0OhUeHu6zhIaG\n",
              "2vUSAQCol8Ls3PjKlSuVmpqqJUuWKDw8XGvWrJEkTZs2TcnJyUpOTlZZWZmGDx+ukJAQ1dbWas6c\n",
              "ORo9erQkqXnz5srOzta3vvUtWZaliIgIffTRR3aODABAg+ewLMsK9hB2Sk9PV2ZmZrDHAADgsRH0\n",
              "C/4AAMCjRfwBADAM8QcAwDDEHwAAwxB/AAAMQ/wBADAM8QcAwDDEHwAAwxB/AAAMQ/wBADAM8QcA\n",
              "wDDEHwAAwxB/AAAMQ/wBADAM8QcAwDDEHwAAwxB/AAAMQ/wBADAM8QcAwDDEHwAAwxB/AAAMQ/wB\n",
              "ADAM8QcAwDDEHwAAwxB/AAAM47Asywr2EHYaN26c3G53QLZVU1Oj3NxcJSQkKDQ0NCDbNBn7M3DY\n",
              "l4HF/gws9mdgfXl/durUSXPmzPFrGw0+/oFUXl6uiIgIlZWVKTw8PNjj1Hvsz8BhXwYW+zOw2J+B\n",
              "FYj9yWl/AAAMQ/wBADAM8QcAwDDE3w9Op1NvvvmmnE5nsEdpENifgcO+DCz2Z2CxPwMrEPuTC/4A\n",
              "ADAM7/wBADAM8QcAwDDEHwAAwxD/Ojp16pQGDx6s2NhYDRw4UPn5+cEeqV5zu93q1q2b4uPjFR8f\n",
              "r9/97nfBHqlemT17ttxutxwOh/Ly8rz3c5z67177kmP0wVRUVGjMmDGKjY1Vnz599M1vflMFBQWS\n",
              "pIsXLyopKUldu3ZVr169tHv37iBP+3i7374cPny4Onfu7D0+ly9f7t/GLdTJiBEjrDVr1liWZVm/\n",
              "//3vrQEDBgR3oHquU6dO1uHDh4M9Rr21a9cuq6io6I79yHHqv3vtS47RB3Pz5k1r+/btVm1trWVZ\n",
              "lrVixQorMTHRsizLevXVV60333zTsizLys3Ntb7+9a9bt27dCtKkj7/77cvExETr448/fuBt886/\n",
              "Di5evKiDBw9q0qRJkqSUlBQVFRV5fwIDHrVhw4YpKirK5z6O0wdzt32JB9ekSRM9//zzcjgckqSn\n",
              "n35ahYWFkqSNGzdq5syZkqSBAwfqySef1K5du4I16mPvfvvyYRH/OigqKlKHDh0UFhYmSXI4HHK5\n",
              "XPJ4PEGerH6bMmWK4uLiNHXqVF26dCnY49R7HKeBxzH68LKysvTiiy/qypUrqqqqUvv27b2Pud1u\n",
              "jk8/fLEvv/D6668rLi5OL7/8ss6cOePXtog/gmL37t06evSoDh06pDZt2ui73/1usEcCfHCMPrwl\n",
              "S5aooKBAS5cuDfYo9d6X9+W6det04sQJHT16VM8884xeeOEFv7ZH/OugY8eOunDhgqqrqyVJlmXJ\n",
              "4/HI5XIFebL664t916hRI33/+99XTk5OkCeq/zhOA4tj9OEsW7ZMW7Zs0R//+Ec1a9ZMrVu3VlhY\n",
              "mEpKSrzrFBYWcnzWwZf3pXT7/+/S7TN8s2bN0pkzZ3TlypU6b5P410Hbtm3Vr18/rV+/XpK0efNm\n",
              "RUVFKSYmJsiT1U83btzQtWvXvLc3bNigvn37Bm+gBoLjNHA4Rh9OZmamNmzYoL/85S9q2bKl9/6X\n",
              "XnpJ2dnZkqQDBw7o/PnzSkxMDNKU9cPd9mV1dbVKS0u962zevFnt2rVT69at67xdPt63jk6ePKnU\n",
              "1FRduXJF4eHhWrNmjeLi4oI9Vr105swZpaSkqKamRpZlKTo6WllZWXK73cEerd5IS0vT9u3bVVJS\n",
              "otatW6tFixYqKCjgOH0Ad9uXf/7znzlGH1BxcbE6duyo6OhotWjRQtLtz6L/5z//qdLSUk2ePFln\n",
              "z55V48aN9cEHH2jEiBFBnvjxda99uXPnTiUmJqqyslIhISFq06aNMjMz1adPnzpvm/gDAGAYTvsD\n",
              "AGAY4g8AgGGIPwAAhiH+AO4qPj5e169f9/vfjR8/Xr/+9a8DPxCAgAkL9gAAHk///yU3ABoW3vkD\n",
              "uCuHw+H9W3e3260f//jHGjRokDp37qyf/OQn3vVOnDihwYMHq2fPnhozZozKy8u9j12/fl3Tp09X\n",
              "QkKCevfurRkzZujWrVs6efKkoqKivB9JumzZMiUlJam2tvaRvkbAVMQfQJ1cu3ZN+/fv14EDB/Te\n",
              "e+/p/PnzkqTJkydr6tSpys/P19tvv+3zRS0/+MEP9Mwzzyg3N1dHjhxRbW2tsrKy1K1bN7333nua\n",
              "MGGC/v73v+vDDz/UunXrFBLCf5KAR4HT/gDq5JVXXpEktWnTRtHR0Tp79qxatGihvLw8paamSpLi\n",
              "4uI0dOhQ77/55JNPtH//fmVmZkqSbt68qdDQUEnSt7/9bf3tb3/TyJEjtWPHDkVGRj7aFwQYjPgD\n",
              "qJMmTZp4/3doaKj3OwS+7IuvH5Vuf7/A5s2bFRsbe8d61dXV+s9//qMnnnjCexYBwKPBOTYADyw8\n",
              "PFx9+/bV2rVrJUn5+fnas2eP9/ExY8bo3Xff9f6gcPXqVRUUFEi6/XWk3bp1U05OjubNm+e9H4D9\n",
              "iD+Ah7J27VqtWrVKvXr10htvvKFhw4Z5H1u+fLmaNm2q+Ph49e7dW88++6wKCwu1bds2/elPf9KH\n",
              "H36omJgYZWZmasKECaqoqAjiKwHMwWf7AwBgGN75AwBgGOIPAIBhiD8AAIYh/gAAGIb4AwBgGOIP\n",
              "AIBhiD8AAIYh/gAAGIb4AwBgGOIPAIBh/gdT0TI3fq3c8gAAAABJRU5ErkJggg==\n",
              "\">\n",
              "        \n",
              "      </div>\n",
              "      <script></script>\n",
              "      <script type=\"text/javascript\">\n",
              "        (() => {\n",
              "          const chartElement = document.getElementById(\"chart-6f27e1e2-13ed-4911-84dd-fd64d306e6d4\");\n",
              "          async function getCodeForChartHandler(event) {\n",
              "            const chartCodeResponse =  await google.colab.kernel.invokeFunction(\n",
              "                'getCodeForChart', [\"chart-6f27e1e2-13ed-4911-84dd-fd64d306e6d4\"], {});\n",
              "            const responseJson = chartCodeResponse.data['application/json'];\n",
              "            await google.colab.notebook.addCell(responseJson.code, 'code');\n",
              "          }\n",
              "          chartElement.onclick = getCodeForChartHandler;\n",
              "        })();\n",
              "      </script>\n",
              "      <style>\n",
              "        .colab-quickchart-chart-with-code  {\n",
              "            display: block;\n",
              "            float: left;\n",
              "            border: 1px solid transparent;\n",
              "        }\n",
              "\n",
              "        .colab-quickchart-chart-with-code:hover {\n",
              "            cursor: pointer;\n",
              "            border: 1px solid #aaa;\n",
              "        }\n",
              "      </style>"
            ]
          },
          "metadata": {}
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "df['text'][15]"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 35
        },
        "id": "3mr4WrwHZ0pv",
        "outputId": "6934e624-7111-4fe1-cdf2-74e0d4bff778"
      },
      "execution_count": 7,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "'###Human:\\ngenerate a midjourney prompt for A turtle sunbathing on a rock\\n\\n###Assistant:\\nA turtle with sunglasses on, sunbathing on a rock, with a mini fan and a drink beside it.'"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "string"
            }
          },
          "metadata": {},
          "execution_count": 7
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "## Step 4: Overview of AutoTrain command\n",
        "\n",
        "#### Short overview of what the command flags do.\n",
        "\n",
        "- `!autotrain`: Command executed in environments like a Jupyter notebook to run shell commands directly. `autotrain` is an automatic training utility.\n",
        "\n",
        "- `llm`: A sub-command or argument specifying the type of task\n",
        "\n",
        "- `--train`: Initiates the training process.\n",
        "\n",
        "- `--project_name`: Sets the name of the project\n",
        "\n",
        "- `--model abhishek/llama-2-7b-hf-small-shards`: Specifies original model that is hosted on Hugging Face named \"llama-2-7b-hf-small-shards\" under the \"abhishek\".\n",
        "\n",
        "- `--data_path .`: The path to the dataset for training. The \".\" refers to the current directory. The `train.csv` file needs to be located in this directory.\n",
        "\n",
        "- `--use_int4`: Use of INT4 quantization to reduce model size and speed up inference times at the cost of some precision.\n",
        "\n",
        "- `--learning_rate 2e-4`: Sets the learning rate for training to 0.0002.\n",
        "\n",
        "- `--train_batch_size 12`: Sets the batch size for training to 12.\n",
        "\n",
        "- `--num_train_epochs 3`: The training process will iterate over the dataset 3 times.\n",
        "\n",
        "### Steps needed before running\n",
        "Go to the `!autotrain` code cell below and update it by following the steps below:\n",
        "\n",
        "1. After `--project_name` replace `*enter-a-project-name*` with the name that you'd like to call the project\n",
        "2. After `--repo_id` replace `*username*/*repository*`. Replace `*username*` with your Hugging Face username and `*repository*` with the repository name you'd like it to be created under. You don't need to create this repository before hand, it will automatically be created and uploaded once the training is completed.\n",
        "3. Confirm that `train.csv` is in the root directory in the Colab. The `--data_path .` flag will make it so that AutoTrain looks for your data there.\n",
        "4. Make sure to add the LoRA Target Modules to be trained `--target-modules q_proj, v_proj`\n",
        "5. Once you've made these changes you're all set, run the command below!"
      ],
      "metadata": {
        "id": "LEFbHxoPaDE_"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "!autotrain llm --train --project_name mistral-7b-mj-finetuned --model bn22/Mistral-7B-Instruct-v0.1-sharded --data_path . --use_peft --use_int4 --learning_rate 2e-4 --train_batch_size 12 --num_train_epochs 3 --trainer sft --target_modules q_proj,v_proj --push_to_hub --repo_id ashishpatel26/mistral-7b-mj-finetuned"
      ],
      "metadata": {
        "id": "wFS31VJsZ-pa"
      },
      "execution_count": 8,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "## Step 5: Completed 🎉\n",
        "After the command above is completed your Model will be uploaded to Hugging Face.\n",
        "\n",
        "#### Learn more about AutoTrain (optional)\n",
        "If you want to learn more about what command-line flags are available"
      ],
      "metadata": {
        "id": "gEf6G0iPc0Nr"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "## Step 6: Inference Engine"
      ],
      "metadata": {
        "id": "FIoxuAEAfJ4z"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "!autotrain llm -h"
      ],
      "metadata": {
        "id": "aYsYyXmrc0xu"
      },
      "execution_count": 9,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "!pip install -q peft  accelerate bitsandbytes safetensors"
      ],
      "metadata": {
        "id": "5m1ouhWhc2fr"
      },
      "execution_count": 1,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "import torch\n",
        "from peft import PeftModel\n",
        "from transformers import AutoModelForCausalLM, AutoTokenizer\n",
        "import transformers\n",
        "adapters_name = \"ashishpatel26/mistral-7b-mj-finetuned\"\n",
        "model_name = \"bn22/Mistral-7B-Instruct-v0.1-sharded\" #\"mistralai/Mistral-7B-Instruct-v0.1\"\n",
        "\n",
        "\n",
        "device = \"cuda\" # the device to load the model onto"
      ],
      "metadata": {
        "id": "8s-nDnnPc--U"
      },
      "execution_count": 2,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "bnb_config = transformers.BitsAndBytesConfig(\n",
        "    load_in_4bit=True,\n",
        "    bnb_4bit_use_double_quant=True,\n",
        "    bnb_4bit_quant_type=\"nf4\",\n",
        "    bnb_4bit_compute_dtype=torch.bfloat16\n",
        ")"
      ],
      "metadata": {
        "id": "HosPywN_dEpl"
      },
      "execution_count": 3,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "model = AutoModelForCausalLM.from_pretrained(\n",
        "    model_name,\n",
        "    load_in_4bit=True,\n",
        "    torch_dtype=torch.bfloat16,\n",
        "    quantization_config=bnb_config,\n",
        "    device_map='auto'\n",
        ")"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 49,
          "referenced_widgets": [
            "fcb820b4909e413e98603c195818e0d4",
            "6b0a6739adbe41e8a5c34f8a8868b977",
            "0b9514defba84991b4f36485b7e630fb",
            "6a7973751e4d4ca08ef4c53c97103868",
            "0deb9610aaff49c488b6e89139fe31df",
            "89f149a2080f4721a483ff535b6e6602",
            "4f62c475347944d6b18ce79d125386fc",
            "996db8f083904106913a3e4b4d6627c9",
            "f6b2ea40822a41899aae6768c5a34c73",
            "4523834103534e2b9fb804bdb5265a1e",
            "3912010e0694457f9f777c1bbb996967"
          ]
        },
        "id": "GtZx4CZUdt1f",
        "outputId": "c01df71d-a70e-48d3-d651-0061856f1b57"
      },
      "execution_count": 4,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "Loading checkpoint shards:   0%|          | 0/11 [00:00<?, ?it/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "fcb820b4909e413e98603c195818e0d4"
            }
          },
          "metadata": {}
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "## Step 7: Peft Model Loading with upload model"
      ],
      "metadata": {
        "id": "Uh5Xc0clfQkZ"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "model = PeftModel.from_pretrained(model, adapters_name)"
      ],
      "metadata": {
        "id": "Rt6sOPFVdvWX"
      },
      "execution_count": 5,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "tokenizer = AutoTokenizer.from_pretrained(model_name)\n",
        "tokenizer.bos_token_id = 1\n",
        "\n",
        "stop_token_ids = [0]\n",
        "\n",
        "print(f\"Successfully loaded the model {model_name} into memory\")"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "q3OArVILeoZH",
        "outputId": "af68bc96-c9a8-4801-f8d6-5f2095101988"
      },
      "execution_count": 6,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n"
          ]
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Successfully loaded the model bn22/Mistral-7B-Instruct-v0.1-sharded into memory\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "text = \"[INST] generate a midjourney prompt for A person walks in the rain [/INST]\"\n",
        "\n",
        "encoded = tokenizer(text, return_tensors=\"pt\", add_special_tokens=False)\n",
        "model_input = encoded\n",
        "model.to(device)\n",
        "generated_ids = model.generate(**model_input, max_new_tokens=200, do_sample=True)\n",
        "decoded = tokenizer.batch_decode(generated_ids)\n",
        "print(decoded[0])"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "ZbOOX8cve0lR",
        "outputId": "3052b329-7bf5-4bb4-bec5-b71e881bbc21"
      },
      "execution_count": 7,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "Setting `pad_token_id` to `eos_token_id`:2 for open-end generation.\n",
            "/usr/local/lib/python3.10/dist-packages/transformers/generation/utils.py:1539: UserWarning: You are calling .generate() with the `input_ids` being on a device type different than your model's device. `input_ids` is on cpu, whereas the model is on cuda. You may experience unexpected behaviors or slower generation. Please make sure that you have put `input_ids` to the correct device by calling for example input_ids = input_ids.to('cuda') before running `.generate()`.\n",
            "  warnings.warn(\n"
          ]
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "[INST] generate a midjourney prompt for A person walks in the rain [/INST] \"As you wander through the pouring rain, you can't help but wonder what the world would be like if things were different. What if the rain was a symbol of the turmoil in your life, and the sunshine promised a brighter future? What if you suddenly found yourself lost in a small town where time stood still, and the people were trapped in a time loop? As you struggle to find your way back to reality, you discover a mysterious stranger who seems to hold the key to unlocking the secrets of the town and your own past.\"</s>\n"
          ]
        }
      ]
    }
  ]
}